Sha256: 0d066911d0d10beb77b071dd0ee0c04ae99e55abdf1e49808a52eaaef6d8f3e5

Contents?: true

Size: 436 Bytes

Versions: 5

Compression:

Stored size: 436 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")

solidus_cap = Spree::Product.find_by!(name: "Solidus cap")

solidus_cap.option_types = [size, color]
solidus_cap.save!

solidus_hoodie = Spree::Product.find_by!(name: "Solidus hoodie")

solidus_hoodie.option_types = [size, color]
solidus_hoodie.save!

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
solidus_sample-4.3.4 db/samples/product_option_types.rb
solidus_sample-4.3.3 db/samples/product_option_types.rb
solidus_sample-4.3.2 db/samples/product_option_types.rb
solidus_sample-4.3.1 db/samples/product_option_types.rb
solidus_sample-4.3.0 db/samples/product_option_types.rb