Sha256: 9a40f8be0a05605d15ad1b8fcf741eb1aadcea9092dea131efbebadaf58fcf1c

Contents?: true

Size: 607 Bytes

Versions: 8

Compression:

Stored size: 607 Bytes

Contents

ActiveAdmin.register_page "Settings" do
  content do    
    # Mergin db settings objects and default values
    # from config/activaadmin_settings.yml file.

    all_settings  = {}
    ActiveadminSettings::Setting.all.each do |s|
      all_settings[s.name] = s
    end

    groups = ActiveadminSettings.groups
    groups.each do |g|
      g[:default_settings].each_key do |name|
        s = all_settings[name]
        g[:settings] << s if s
      end
    end

    render  :partial  => "index",
            :locals   => { :admins   => AdminUser.all,
                           :groups   => groups}
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
activeadmin-settings-0.2.8 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.7 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.6 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.5 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.4 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.3 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.2 lib/generators/activeadmin_settings/templates/admin/settings.rb
activeadmin-settings-0.2.1 lib/generators/activeadmin_settings/templates/admin/settings.rb