Sha256: 9aa4e4c0a6e8441e80743220e968ab17367d5b4ffb6457a3349398e2f6e70e58

Contents?: true

Size: 473 Bytes

Versions: 42

Compression:

Stored size: 473 Bytes

Contents

Spree::Sample.load_sample('products')

size = Spree::OptionType.find_by!(presentation: 'Size')
color = Spree::OptionType.find_by!(presentation: 'Color')

ror_baseball_jersey = Spree::Product.find_by!(name: 'Ruby on Rails Baseball Jersey')
ror_baseball_jersey.option_types = [size, color]
ror_baseball_jersey.save!

spree_baseball_jersey = Spree::Product.find_by!(name: 'Spree Baseball Jersey')
spree_baseball_jersey.option_types = [size, color]
spree_baseball_jersey.save!

Version data entries

42 entries across 42 versions & 1 rubygems

Version Path
spree_sample-4.0.9 db/samples/product_option_types.rb
spree_sample-4.0.8 db/samples/product_option_types.rb
spree_sample-3.7.14.1 db/samples/product_option_types.rb
spree_sample-4.0.7.1 db/samples/product_option_types.rb
spree_sample-4.0.7 db/samples/product_option_types.rb
spree_sample-3.7.14 db/samples/product_option_types.rb
spree_sample-4.0.6 db/samples/product_option_types.rb
spree_sample-3.7.13 db/samples/product_option_types.rb
spree_sample-4.0.5 db/samples/product_option_types.rb
spree_sample-3.7.12 db/samples/product_option_types.rb
spree_sample-4.0.4 db/samples/product_option_types.rb
spree_sample-3.7.11 db/samples/product_option_types.rb
spree_sample-3.7.10 db/samples/product_option_types.rb
spree_sample-4.0.3 db/samples/product_option_types.rb
spree_sample-3.7.9 db/samples/product_option_types.rb
spree_sample-4.0.2 db/samples/product_option_types.rb
spree_sample-3.7.8 db/samples/product_option_types.rb
spree_sample-4.0.1 db/samples/product_option_types.rb
spree_sample-3.7.7 db/samples/product_option_types.rb
spree_sample-4.0.0 db/samples/product_option_types.rb