Sha256: 1dad560f7b23af17f9feaf472b77124bcaa206eeee7320038dafef70a8eb3f3e
Contents?: true
Size: 453 Bytes
Versions: 29
Compression:
Stored size: 453 Bytes
Contents
Factory.define(:variant) do |f| f.price 19.99 f.cost_price 17.00 f.sku { Faker::Lorem.sentence } f.weight { BigDecimal.new("#{rand(200)}.#{rand(99)}") } f.height { BigDecimal.new("#{rand(200)}.#{rand(99)}") } f.width { BigDecimal.new("#{rand(200)}.#{rand(99)}") } f.depth { BigDecimal.new("#{rand(200)}.#{rand(99)}") } # associations: f.product { |p| p.association(:product) } f.option_values { [Factory(:option_value)] } end
Version data entries
29 entries across 29 versions & 6 rubygems