Sha256: fbe38f5c5927fc8be8964debbe891c33406fe0e17c5093bacb8519477bbd5ed4

Contents?: true

Size: 311 Bytes

Versions: 3

Compression:

Stored size: 311 Bytes

Contents

Comable::Sample.import('orders')
Comable::Sample.import('shipment_methods')

shipment_method = Comable::ShipmentMethod.first

Comable::Order.complete.each do |order|
  shipment = order.shipments.create!(shipment_method: shipment_method, fee: shipment_method.fee)
  shipment.state = 'ready'
  shipment.save!
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
comable-sample-0.7.1 db/samples/shipments.rb
comable-sample-0.7.0 db/samples/shipments.rb
comable-sample-0.7.0.beta2 db/samples/shipments.rb