groupe_instructeur: unsassign instructeurs on group destroy

Fix #4282
This commit is contained in:
Pierre de La Morinerie 2019-09-09 13:40:45 +00:00
parent f1f0c76d13
commit 2724f4667b
2 changed files with 4 additions and 4 deletions

View file

@ -2,6 +2,6 @@ class GroupeInstructeur < ApplicationRecord
DEFAULT_LABEL = 'défaut'
belongs_to :procedure
has_many :assign_tos
has_many :instructeurs, through: :assign_tos
has_many :instructeurs, through: :assign_tos, dependent: :destroy
has_many :dossiers
end