[Fix #3081] If a dossier is destroyed, then destroy the attestation

This commit is contained in:
Mathieu Magnin 2018-11-28 16:13:58 +01:00
parent 594cf51ac3
commit b51bf759b1

View file

@ -15,7 +15,7 @@ class Dossier < ApplicationRecord
has_one :etablissement, dependent: :destroy has_one :etablissement, dependent: :destroy
has_one :individual, dependent: :destroy has_one :individual, dependent: :destroy
has_one :attestation has_one :attestation, dependent: :destroy
has_many :pieces_justificatives, dependent: :destroy has_many :pieces_justificatives, dependent: :destroy
has_many :champs, -> { public_only.ordered }, dependent: :destroy has_many :champs, -> { public_only.ordered }, dependent: :destroy