Sha256: e379bf36da2850a03c46c0f1566ba33beb2134fb1613e4de62078fd50114c596
Contents?: true
Size: 698 Bytes
Versions: 12
Compression:
Stored size: 698 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] unless s s = ActiveadminSettings::Setting.initiate_setting(name) end g[:settings] << s end end render :partial => "index", :locals => { :admins => AdminUser.all, :groups => groups} end end
Version data entries
12 entries across 12 versions & 1 rubygems