Class: SpreeCmCommissioner::DynamicField
- Defined in:
- app/models/spree_cm_commissioner/dynamic_field.rb
Instance Method Summary collapse
- #multiple_select ⇒ Object
- #multiple_select=(value) ⇒ Object
- #requires_dynamic_field_options? ⇒ Boolean
Instance Method Details
#multiple_select ⇒ Object
21 22 23 24 25 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 21 def multiple_select return nil unless selection? configurations['multiple_select'] == true end |
#multiple_select=(value) ⇒ Object
27 28 29 30 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 27 def multiple_select=(value) self.configurations ||= {} self.configurations['multiple_select'] = ActiveModel::Type::Boolean.new.cast(value) end |
#requires_dynamic_field_options? ⇒ Boolean
17 18 19 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 17 def checkbox? || radio? || selection? end |