Module: ActiveAdmin::Settings

Included in:
Application
Defined in:
lib/active_admin/helpers/settings.rb

Overview

Adds a class method to a class to create settings with default values.

Example:

class Configuration
  include ActiveAdmin::Settings

  setting :site_title, "Default Site Title"
end

conf = Configuration.new
conf.site_title #=> "Default Site Title"
conf.site_title = "Override Default"
conf.site_title #=> "Override Default"

Defined Under Namespace

Modules: ClassMethods, Inheritance

Instance Method Summary (collapse)

Instance Method Details

- (Object) read_default_setting(name)



24
25
26
# File 'lib/active_admin/helpers/settings.rb', line 24

def read_default_setting(name)
  default_settings[name]
end