Sha256: abc7699a977fc9f88bc57d6651ad5982b7e57f11e52a626d72dd0ee0009b2945
Contents?: true
Size: 466 Bytes
Versions: 11
Compression:
Stored size: 466 Bytes
Contents
class AddShippingRatesToShipments < ActiveRecord::Migration def up Spree::Shipment.find_each do |shipment| shipment.shipping_rates.create(shipping_method_id: shipment.shipping_method_id, cost: shipment.cost, selected: true) end remove_column :spree_shipments, :shipping_method_id end def down add_column :spree_shipments, :shipping_method_id, :integer end end
Version data entries
11 entries across 11 versions & 1 rubygems