models: require belong_to associations on traitement

This commit is contained in:
Pierre de La Morinerie 2020-07-20 17:04:05 +02:00
parent 059c147ffc
commit d807700c7b

View file

@ -10,7 +10,7 @@
# dossier_id :bigint # dossier_id :bigint
# #
class Traitement < ApplicationRecord class Traitement < ApplicationRecord
belongs_to :dossier belongs_to :dossier, optional: false
scope :termine_close_to_expiration, -> do scope :termine_close_to_expiration, -> do
joins(dossier: :procedure) joins(dossier: :procedure)