models: require belong_to associations on deleted_dossier

This commit is contained in:
Pierre de La Morinerie 2020-07-20 16:35:44 +02:00
parent dd1bed9340
commit 01248022bf

View file

@ -12,7 +12,7 @@
# procedure_id :bigint
#
class DeletedDossier < ApplicationRecord
belongs_to :procedure, -> { with_discarded }, inverse_of: :deleted_dossiers
belongs_to :procedure, -> { with_discarded }, inverse_of: :deleted_dossiers, optional: false
validates :dossier_id, uniqueness: true