Class: SettrSetting
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- SettrSetting
- Defined in:
- app/models/settr_setting.rb
Instance Method Summary collapse
Instance Method Details
#options=(opts) ⇒ Object
23 24 25 |
# File 'app/models/settr_setting.rb', line 23 def (opts) write_attribute :options, opts.gsub(' ','').gsub(',', ', ') end |
#select? ⇒ Boolean
19 20 21 |
# File 'app/models/settr_setting.rb', line 19 def select? typ == 'select' end |
#val ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'app/models/settr_setting.rb', line 6 def val case typ when 'boolean' value == 'true' when 'float' value.to_f when 'integer' value.to_i else value end end |