From 9510142cd82b0ccdfac6c45165fec9701b27d33a Mon Sep 17 00:00:00 2001 From: Paul Chavard Date: Wed, 14 Dec 2022 09:44:19 +0100 Subject: [PATCH] fix(dossier): parent_dossiers is really cloned_dossiers --- app/models/dossier.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/dossier.rb b/app/models/dossier.rb index 379ac34cf..17fdaab3e 100644 --- a/app/models/dossier.rb +++ b/app/models/dossier.rb @@ -149,7 +149,7 @@ class Dossier < ApplicationRecord belongs_to :transfer, class_name: 'DossierTransfer', foreign_key: 'dossier_transfer_id', optional: true, inverse_of: :dossiers has_many :transfer_logs, class_name: 'DossierTransferLog', dependent: :destroy - has_many :parent_dossiers, class_name: 'Dossier', foreign_key: 'parent_dossier_id', dependent: :nullify, inverse_of: :parent_dossier + has_many :cloned_dossiers, class_name: 'Dossier', foreign_key: 'parent_dossier_id', dependent: :nullify, inverse_of: :parent_dossier accepts_nested_attributes_for :champs_public accepts_nested_attributes_for :champs_private