summaryrefslogtreecommitdiffstats
path: root/app/models/setting.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/setting.rb')
-rw-r--r--app/models/setting.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/setting.rb b/app/models/setting.rb
index 3e3476330..1b73d7c1f 100644
--- a/app/models/setting.rb
+++ b/app/models/setting.rb
@@ -320,8 +320,10 @@ class Setting < ActiveRecord::Base
end
def self.load_available_settings
- YAML::load(File.open("#{Rails.root}/config/settings.yml")).each do |name, options|
- define_setting name, options
+ File.open("#{Rails.root}/config/settings.yml") do |f|
+ YAML.load(f).each do |name, options|
+ define_setting name, options
+ end
end
end