Class: PreferenceType
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- PreferenceType
- Defined in:
- app/models/preference_type.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.iid(internal_identifier) ⇒ Object
19 20 21 |
# File 'app/models/preference_type.rb', line 19 def self.iid( internal_identifier ) where('internal_identifier = ?', internal_identifier.to_s).first end |
Instance Method Details
#default_value ⇒ Object
23 24 25 |
# File 'app/models/preference_type.rb', line 23 def default_value default_preference_option.value end |
#options_hash ⇒ Object
15 16 17 |
# File 'app/models/preference_type.rb', line 15 def Hash[*self..collect { |v|[v.internal_identifier, v.value]}.flatten] end |