Sha256: 0cc9d27b0a03b2d3cfb316df7b808f9fdd9dba7cac09874fa66e793966a39169

Contents?: true

Size: 867 Bytes

Versions: 40

Compression:

Stored size: 867 Bytes

Contents

# frozen_string_literal: true

Spree::Sample.load_sample("option_types")

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

Spree::OptionValue.create!([
  {
    name: "Small",
    presentation: "S",
    position: 1,
    option_type: size
  },
  {
    name: "Medium",
    presentation: "M",
    position: 2,
    option_type: size
  },
  {
    name: "Large",
    presentation: "L",
    position: 3,
    option_type: size
  },
  {
    name: "Extra Large",
    presentation: "XL",
    position: 4,
    option_type: size
  },
  {
    name: "Red",
    presentation: "Red",
    position: 1,
    option_type: color
  },
  {
    name: "Green",
    presentation: "Green",
    position: 2,
    option_type: color
  },
  {
    name: "Blue",
    presentation: "Blue",
    position: 3,
    option_type: color
  }
])

Version data entries

40 entries across 40 versions & 2 rubygems

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