add dependent destroy on dossier
This commit is contained in:
parent
3f11e09937
commit
a30eac41fc
1 changed files with 5 additions and 5 deletions
|
@ -7,13 +7,13 @@ class Dossier < ActiveRecord::Base
|
|||
deposited: 'deposited',
|
||||
processed: 'processed' }
|
||||
|
||||
has_one :etablissement
|
||||
has_one :entreprise
|
||||
has_one :cerfa
|
||||
has_many :pieces_justificatives
|
||||
has_one :etablissement, dependent: :destroy
|
||||
has_one :entreprise, dependent: :destroy
|
||||
has_one :cerfa, dependent: :destroy
|
||||
has_many :pieces_justificatives, dependent: :destroy
|
||||
belongs_to :procedure
|
||||
belongs_to :user
|
||||
has_many :commentaires
|
||||
has_many :commentaires, dependent: :destroy
|
||||
|
||||
delegate :siren, to: :entreprise
|
||||
delegate :siret, to: :etablissement
|
||||
|
|
Loading…
Reference in a new issue