Sha256: 63f08e5b9af18b2555e5b853178604e8d493526d20dc227f5ad74b3d26026272

Contents?: true

Size: 836 Bytes

Versions: 17

Compression:

Stored size: 836 Bytes

Contents

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

17 entries across 17 versions & 1 rubygems

Version Path
solidus_sample-2.5.2 db/samples/option_values.rb
solidus_sample-2.5.1 db/samples/option_values.rb
solidus_sample-2.5.0 db/samples/option_values.rb
solidus_sample-2.5.0.rc1 db/samples/option_values.rb
solidus_sample-2.5.0.beta2 db/samples/option_values.rb
solidus_sample-2.5.0.beta1 db/samples/option_values.rb
solidus_sample-2.4.2 db/samples/option_values.rb
solidus_sample-2.4.1 db/samples/option_values.rb
solidus_sample-2.3.1 db/samples/option_values.rb
solidus_sample-2.4.0 db/samples/option_values.rb
solidus_sample-2.4.0.rc1 db/samples/option_values.rb
solidus_sample-2.4.0.beta1 db/samples/option_values.rb
solidus_sample-2.3.0 db/samples/option_values.rb
solidus_sample-2.3.0.rc3 db/samples/option_values.rb
solidus_sample-2.3.0.rc2 db/samples/option_values.rb
solidus_sample-2.3.0.rc1 db/samples/option_values.rb
solidus_sample-2.3.0.beta1 db/samples/option_values.rb