Define class used in migration.

This commit is contained in:
Andrew Spinks
2013-08-14 10:32:47 +10:00
parent d5791657f3
commit 0f1142fc30

View File

@@ -1,4 +1,11 @@
class CreateEnterpriseFeeRecordsForProductDistributions < ActiveRecord::Migration
class ProductDistribution < ActiveRecord::Base
belongs_to :shipping_method, :class_name => 'Spree::ShippingMethod'
belongs_to :distributor, :class_name => 'Enterprise'
belongs_to :enterprise_fee
end
def up
ProductDistribution.all.each do |pd|
calculator = pd.shipping_method.calculator.dup