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.6.3 db/samples/product_option_types.rb
solidus_sample-2.8.0 db/samples/product_option_types.rb
solidus_sample-2.7.1 db/samples/product_option_types.rb
solidus_sample-2.6.2 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.14 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.13 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.12 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.11 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.10 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.9 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.8 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.7 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.6 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.5 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.4 db/samples/product_option_types.rb
solidus_sample_devise_token_auth-2.8.0.alpha.3 db/samples/product_option_types.rb
solidus_sample-2.7.0 db/samples/product_option_types.rb
solidus_sample-2.6.1 db/samples/product_option_types.rb
solidus_sample-2.6.0 db/samples/product_option_types.rb
solidus_sample-2.6.0.rc1 db/samples/product_option_types.rb