Class: Spree::OptionValue

Inherits:
Base
  • Object
show all
Defined in:
app/models/spree/option_value.rb

Instance Method Summary collapse

Methods inherited from Base

display_includes, #initialize_preference_defaults, page, preference

Methods included from Preferences::Preferable

#admin_form_preference_names, #default_preferences, #defined_preferences, #get_preference, #has_preference!, #has_preference?, #preference_default, #preference_type, #set_preference

Instance Method Details

#presentation_with_option_typeString

Returns a string representation of all option value and its option type.

Returns:

  • (String)

    a string representation of all option value and its option type



29
30
31
# File 'app/models/spree/option_value.rb', line 29

def presentation_with_option_type
  "#{option_type.presentation} - #{presentation}"
end

#touch_all_variantsObject

Updates the updated_at column on all the variants associated with this option value.



23
24
25
# File 'app/models/spree/option_value.rb', line 23

def touch_all_variants
  variants.find_each(&:touch)
end