diff --git a/plugins/orders/models/orders_plugin/item.rb b/plugins/orders/models/orders_plugin/item.rb index 1f6f4ea..7f0c3ba 100644 --- a/plugins/orders/models/orders_plugin/item.rb +++ b/plugins/orders/models/orders_plugin/item.rb @@ -40,10 +40,10 @@ class OrdersPlugin::Item < ActiveRecord::Base # FIXME: don't work because of load order #if defined? SuppliersPlugin - has_many :from_products, through: :product + has_many :from_products, through: :product, source: :orders has_many :to_products, through: :product - has_many :sources_supplier_products, through: :product - has_many :supplier_products, through: :product + has_many :sources_supplier_products, through: :product, source: :items + has_many :supplier_products, through: :product, source: :enterprise has_many :suppliers, through: :product #end def from_product -- libgit2 0.21.2