Sha256: 2448211328d19097fbc61fd7932c5dc975c8076f17691a42c1d4affff0810d3e
Contents?: true
Size: 474 Bytes
Versions: 18
Compression:
Stored size: 474 Bytes
Contents
class AddShippingRatesToShipments < ActiveRecord::Migration def up Spree::Shipment.all.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
18 entries across 18 versions & 1 rubygems