fix(dossier): fix dossier.avis cascade
This commit is contained in:
parent
6eae97944d
commit
d5d3995dad
4 changed files with 22 additions and 11 deletions
|
@ -49,6 +49,7 @@ class Avis < ApplicationRecord
|
|||
scope :for_dossier, -> (dossier_id) { where(dossier_id: dossier_id) }
|
||||
scope :by_latest, -> { order(updated_at: :desc) }
|
||||
scope :updated_since?, -> (date) { where('avis.updated_at > ?', date) }
|
||||
scope :discarded_termine_expired, -> { unscope(:joins).where(dossier: Dossier.discarded_termine_expired) }
|
||||
|
||||
# The form allows subtmitting avis requests to several emails at once,
|
||||
# hence this virtual attribute.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue