diff --git a/app/services/setting_registry.rb b/app/services/setting_registry.rb index 17e933f7f009..2d596123fa6a 100644 --- a/app/services/setting_registry.rb +++ b/app/services/setting_registry.rb @@ -132,18 +132,9 @@ def load_definitions end end - def known_categories - unless @known_descendants == Setting.descendants - @known_descendants = Setting.descendants - @known_categories = @known_descendants.map(&:name) << 'Setting' - @values_loaded_at = nil # force all values to be reloaded - end - @known_categories - end - def load_values(ignore_cache: false) # we are loading only known STIs as we load settings fairly early the first time and plugin classes might not be loaded yet. - settings = Setting.unscoped.where(category: known_categories).where.not(value: nil) + settings = Setting.unscoped.where(category: 'Setting').where.not(value: nil) settings = settings.where('updated_at >= ?', @values_loaded_at) unless ignore_cache || @values_loaded_at.nil? settings.each do |s| unless (definition = find(s.name))