Sha256: 27345b64102fad1ee4af25a4c56c26623b65f71cca07819bbbd5a7a136d28928
Contents?: true
Size: 764 Bytes
Versions: 42
Compression:
Stored size: 764 Bytes
Contents
Spree::Sample.load_sample('variants') country = Spree::Country.find_by(iso: 'US') location = Spree::StockLocation.first_or_create!(name: 'default', address1: 'Example Street', city: 'City', zipcode: '12345', country: country, state: country.states.first) location.active = true location.save! Spree::Variant.all.each do |variant| next if variant.is_master? && variant.product.has_variants? variant.stock_items.each do |stock_item| Spree::StockMovement.create(quantity: 10, stock_item: stock_item) end end
Version data entries
42 entries across 42 versions & 1 rubygems