From ac60b151ea9cc65f1a01eea28e7b544ed8cc49ed Mon Sep 17 00:00:00 2001 From: Martin Edenhofer Date: Fri, 25 Mar 2016 10:27:52 +0100 Subject: [PATCH] Code cleanup. --- app/models/setting.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/models/setting.rb b/app/models/setting.rb index 84d4203b6..8ca6e1911 100644 --- a/app/models/setting.rb +++ b/app/models/setting.rb @@ -31,7 +31,7 @@ set config setting =end def self.set(name, value) - setting = Setting.find_by( name: name ) + setting = Setting.find_by(name: name) if !setting raise "Can't find config setting '#{name}'" end @@ -66,7 +66,7 @@ reset config setting to default =end def self.reset(name) - setting = Setting.find_by( name: name ) + setting = Setting.find_by(name: name) if !setting raise "Can't find config setting '#{name}'" end @@ -109,7 +109,7 @@ reload config settings config.each { |key, value| next if value.class.to_s != 'String' - config[key].gsub!( /\#\{config\.(.+?)\}/ ) { + config[key].gsub!(/\#\{config\.(.+?)\}/) { config[$1].to_s } }