Sha256: 5e4c55debe9624772e7705864d71e313c54955de2f8cbc34f69c0110daa97ba5

Contents?: true

Size: 1.03 KB

Versions: 83

Compression:

Stored size: 1.03 KB

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: 5,
    option_type: color
  },
  {
    name: "Green",
    presentation: "Green",
    position: 4,
    option_type: color
  },
  {
    name: "Black",
    presentation: "Black",
    position: 1,
    option_type: color
  },
  {
    name: "White",
    presentation: "White",
    position: 2,
    option_type: color
  },
  {
    name: "Blue",
    presentation: "Blue",
    position: 3,
    option_type: color
  }
])

Version data entries

83 entries across 83 versions & 1 rubygems

Version Path
solidus_sample-4.2.4 db/samples/option_values.rb
solidus_sample-4.1.5 db/samples/option_values.rb
solidus_sample-4.1.4 db/samples/option_values.rb
solidus_sample-4.2.3 db/samples/option_values.rb
solidus_sample-4.1.3 db/samples/option_values.rb
solidus_sample-4.0.4 db/samples/option_values.rb
solidus_sample-3.4.6 db/samples/option_values.rb
solidus_sample-4.0.3 db/samples/option_values.rb
solidus_sample-4.1.2 db/samples/option_values.rb
solidus_sample-4.2.2 db/samples/option_values.rb
solidus_sample-3.4.5 db/samples/option_values.rb
solidus_sample-4.2.1 db/samples/option_values.rb
solidus_sample-4.2.0 db/samples/option_values.rb
solidus_sample-4.1.1 db/samples/option_values.rb
solidus_sample-4.0.2 db/samples/option_values.rb
solidus_sample-3.4.4 db/samples/option_values.rb
solidus_sample-3.3.4 db/samples/option_values.rb
solidus_sample-3.2.9 db/samples/option_values.rb
solidus_sample-3.2.8 db/samples/option_values.rb
solidus_sample-3.3.3 db/samples/option_values.rb