Class: Spree::OptionValue

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

Instance Method Summary collapse

Methods inherited from Base

page

Methods included from Preferences::Preferable

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

Instance Method Details

#touch_all_variantsObject



11
12
13
14
15
16
17
18
# File 'app/models/spree/option_value.rb', line 11

def touch_all_variants
  # This can cause a cascade of products to be updated
  # To disable it in Rails 4.1, we can do this:
  # https://github.com/rails/rails/pull/12772
  # Spree::Product.no_touching do
    variants.find_each(&:touch)
  # end
end