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