add destroy dependent option for exports

This commit is contained in:
Christophe Robillard 2020-06-11 12:33:29 +02:00
parent 3411a62fb4
commit 8b802ae2c8

View file

@ -4,7 +4,7 @@ class GroupeInstructeur < ApplicationRecord
has_many :assign_tos, dependent: :destroy has_many :assign_tos, dependent: :destroy
has_many :instructeurs, through: :assign_tos has_many :instructeurs, through: :assign_tos
has_many :dossiers has_many :dossiers
has_and_belongs_to_many :exports has_and_belongs_to_many :exports, dependent: :destroy
validates :label, presence: { message: 'doit être renseigné' }, allow_nil: false validates :label, presence: { message: 'doit être renseigné' }, allow_nil: false
validates :label, uniqueness: { scope: :procedure, message: 'existe déjà' } validates :label, uniqueness: { scope: :procedure, message: 'existe déjà' }