mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-30 19:52:20 +01:00
(bug) fix cannot remove product if it has the relation with machines
This commit is contained in:
parent
ef502070be
commit
7700737cf3
@ -8,7 +8,7 @@ class Product < ApplicationRecord
|
||||
|
||||
belongs_to :product_category
|
||||
|
||||
has_many :machines_products, dependent: :destroy
|
||||
has_many :machines_products, dependent: :delete_all
|
||||
has_many :machines, through: :machines_products
|
||||
|
||||
has_many :product_files, as: :viewable, dependent: :destroy
|
||||
|
Loading…
x
Reference in New Issue
Block a user