Sha256: 04590cb5c88b9c757015640646f5db4c4863f387abba765e71a40d45c0c0b6ad
Contents?: true
Size: 379 Bytes
Versions: 15
Compression:
Stored size: 379 Bytes
Contents
option_types_attributes = [ { name: 'color', presentation: 'Color', position: 1 }, { name: 'length', presentation: 'Length', position: 2 }, { name: 'size', presentation: 'Size', position: 3 }, ] option_types_attributes.each do |attrs| unless Spree::OptionType.where(attrs).exists? Spree::OptionType.create!(attrs) end end
Version data entries
15 entries across 15 versions & 1 rubygems