Class: Spree::OptionType

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

Overview

Option types denote the different options for a variant. A typical option type would be a size, with that option type’s values being something such as “Small”, “Medium” and “Large”. Another typical option type could be a color, such as “Red”, “Green”, or “Blue”.

A product can be assigned many option types, but must be assigned at least one if you wish to create variants for that product.

Instance Method Summary collapse

Methods inherited from Base

display_includes

Methods included from Core::Permalinks

#generate_permalink, #save_permalink

Instance Method Details

#touch_all_productsObject



30
31
32
# File 'app/models/spree/option_type.rb', line 30

def touch_all_products
  products.find_each(&:touch)
end