about summary refs log tree commit diff
path: root/app/lib/settings
diff options
context:
space:
mode:
Diffstat (limited to 'app/lib/settings')
-rw-r--r--app/lib/settings/scoped_settings.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/lib/settings/scoped_settings.rb b/app/lib/settings/scoped_settings.rb
index ef694205c..acabf0c8e 100644
--- a/app/lib/settings/scoped_settings.rb
+++ b/app/lib/settings/scoped_settings.rb
@@ -30,7 +30,7 @@ module Settings
 
     def all_as_records
       vars = thing_scoped
-      records = vars.each_with_object({}) { |r, h| h[r.var] = r }
+      records = vars.index_by(&:var)
 
       Setting.default_settings.each do |key, default_value|
         next if records.key?(key) || default_value.is_a?(Hash)