Class: ActiveadminSettings::Setting

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
SettingMethods, Mongoid::Document, Mongoid::Globalize, Mongoid::Timestamps
Defined in:
app/models/activeadmin_settings/setting.rb,
app/models/activeadmin_settings/setting.rb

Class Method Summary collapse

Methods included from SettingMethods

#default_value, #description, included, #type, #value

Class Method Details

.[](name) ⇒ Object



71
72
73
# File 'app/models/activeadmin_settings/setting.rb', line 71

def self.[](name)
  find_or_create_by(:name => name).value
end