Class: ActiveadminSettingsCached::Model

Inherits:
Object
  • Object
show all
Defined in:
app/models/activeadmin_settings_cached/model.rb

Instance Method Summary collapse

Instance Method Details

#settingsObject



5
6
7
8
9
10
11
12
# File 'app/models/activeadmin_settings_cached/model.rb', line 5

def settings
  data = has_key? ? load_settings_by_key : keep_yml_order
  return unless data

  # override the sorting in order to display items as they are listed in
  # the yml file rather than alphabetically
  ::ActiveSupport::OrderedHash[data.to_a]
end