1
0
mirror of https://github.com/meineerde/redmine.git synced 2026-01-31 11:37:14 +00: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:
Go MAEDA 2023-02-13 14:35:38 +00:00
parent c94296720d
commit 45b4bff194

View File

@ -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