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
23 24 25 26 27 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 23 def multiple_select return nil unless selection? configurations['multiple_select'] == true end |
#multiple_select=(value) ⇒ Object
29 30 31 32 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 29 def multiple_select=(value) self.configurations ||= {} self.configurations['multiple_select'] = ActiveModel::Type::Boolean.new.cast(value) end |
#requires_dynamic_field_options? ⇒ Boolean
19 20 21 |
# File 'app/models/spree_cm_commissioner/dynamic_field.rb', line 19 def checkbox? || radio? || selection? end |