diff options
Diffstat (limited to 'app/lib/settings/scoped_settings.rb')
-rw-r--r-- | app/lib/settings/scoped_settings.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/lib/settings/scoped_settings.rb b/app/lib/settings/scoped_settings.rb index 70de7b792..343996e8a 100644 --- a/app/lib/settings/scoped_settings.rb +++ b/app/lib/settings/scoped_settings.rb @@ -32,7 +32,7 @@ module Settings def all_as_records vars = thing_scoped - records = vars.map { |r| [r.var, r] }.to_h + records = vars.each_with_object({}) { |r, h| h[r.var] = r } Setting.default_settings.each do |key, default_value| next if records.key?(key) || default_value.is_a?(Hash) @@ -66,7 +66,7 @@ module Settings class << self def default_settings - defaulting = DEFAULTING_TO_UNSCOPED.map { |k| [k, Setting[k]] }.to_h + defaulting = DEFAULTING_TO_UNSCOPED.each_with_object({}) { |k, h| h[k] = Setting[k] } Setting.default_settings.merge!(defaulting) end end |