Module: Rea::Settings
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
Instance Method Summary collapse
Instance Method Details
#read_default_setting(name) ⇒ Object
23 24 25 |
# File 'lib/rea/settings.rb', line 23 def read_default_setting(name) default_settings[name] end |