mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Update association
This commit is contained in:
@@ -5,8 +5,8 @@ module Spree
|
||||
acts_as_nested_set dependent: :destroy
|
||||
|
||||
belongs_to :taxonomy, class_name: 'Spree::Taxonomy', touch: true
|
||||
has_many :classifications, dependent: :destroy
|
||||
has_many :products, through: :classifications
|
||||
has_many :products, class_name: "Spree::Product", foreign_key: "primary_taxon_id",
|
||||
inverse_of: :primary_taxon
|
||||
|
||||
before_create :set_permalink
|
||||
|
||||
|
||||
Reference in New Issue
Block a user