mirror of
https://github.com/redmine/redmine.git
synced 2026-03-05 20:11:36 +01:00
Refactor code to use YAML.load_file instead of explicitly opening the file (#38250).
git-svn-id: https://svn.redmine.org/redmine/trunk@22101 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -320,10 +320,8 @@ class Setting < ActiveRecord::Base
|
||||
end
|
||||
|
||||
def self.load_available_settings
|
||||
File.open("#{Rails.root}/config/settings.yml") do |f|
|
||||
YAML.load(f).each do |name, options|
|
||||
define_setting name, options
|
||||
end
|
||||
YAML.load_file(Rails.root.join('config/settings.yml')).each do |name, options|
|
||||
define_setting name, options
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user