Class: UserPreferences::Preference
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- UserPreferences::Preference
- Defined in:
- lib/user_preferences/preference.rb
Instance Method Summary collapse
Instance Method Details
#definition ⇒ Object
22 23 24 |
# File 'lib/user_preferences/preference.rb', line 22 def definition UserPreferences[category, name] end |
#update_value!(v) ⇒ Object
10 11 12 |
# File 'lib/user_preferences/preference.rb', line 10 def update_value!(v) update_attributes!(value: v) end |
#value ⇒ Object
14 15 16 |
# File 'lib/user_preferences/preference.rb', line 14 def value lookup(attributes['value']) end |
#value=(v) ⇒ Object
18 19 20 |
# File 'lib/user_preferences/preference.rb', line 18 def value=(v) super(to_db(v)) end |