Class: Spree::OptionValue
- Defined in:
- app/models/spree/option_value.rb
Instance Method Summary collapse
-
#presentation_with_option_type ⇒ String
A string representation of all option value and its option type.
-
#touch_all_variants ⇒ Object
Updates the updated_at column on all the variants associated with this option value.
Methods inherited from Base
Methods included from Preferences::Preferable
#default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference
Instance Method Details
#presentation_with_option_type ⇒ String
Returns a string representation of all option value and its option type.
25 26 27 |
# File 'app/models/spree/option_value.rb', line 25 def presentation_with_option_type "#{self.option_type.presentation} - #{self.presentation}" end |
#touch_all_variants ⇒ Object
Updates the updated_at column on all the variants associated with this option value.
19 20 21 |
# File 'app/models/spree/option_value.rb', line 19 def touch_all_variants variants.find_each(&:touch) end |