mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-03-01 02:03:22 +00:00
Define class used in migration.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user