Sha256: 1fe40ba9aa9517a88e68dd83a8ad7e84ff13bcd6db30f7c57d2bb661e35feb8a

Contents?: true

Size: 345 Bytes

Versions: 40

Compression:

Stored size: 345 Bytes

Contents

# frozen_string_literal: true

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!

Version data entries

40 entries across 40 versions & 2 rubygems

Version Path
solidus_sample-2.9.6 db/samples/product_option_types.rb
solidus_sample-2.8.6 db/samples/product_option_types.rb
solidus_sample-2.9.5 db/samples/product_option_types.rb
solidus_sample-2.9.4 db/samples/product_option_types.rb
solidus_sample-2.6.6 db/samples/product_option_types.rb
solidus_sample-2.7.4 db/samples/product_option_types.rb
solidus_sample-2.8.5 db/samples/product_option_types.rb
solidus_sample-2.9.3 db/samples/product_option_types.rb
solidus_sample-2.9.2 db/samples/product_option_types.rb
solidus_sample-2.7.3 db/samples/product_option_types.rb
solidus_sample-2.6.5 db/samples/product_option_types.rb
solidus_sample-2.9.1 db/samples/product_option_types.rb
solidus_sample-2.9.0 db/samples/product_option_types.rb
solidus_sample-2.9.0.rc.1 db/samples/product_option_types.rb
solidus_sample-2.8.4 db/samples/product_option_types.rb
solidus_sample-2.8.3 db/samples/product_option_types.rb
solidus_sample-2.7.2 db/samples/product_option_types.rb
solidus_sample-2.6.4 db/samples/product_option_types.rb
solidus_sample-2.8.2 db/samples/product_option_types.rb
solidus_sample-2.8.1 db/samples/product_option_types.rb