refactor Dossier#with_notifications
This commit is contained in:
parent
d01a53eb72
commit
f96377d878
6 changed files with 15 additions and 15 deletions
|
@ -288,7 +288,7 @@ class Dossier < ApplicationRecord
|
|||
scope :for_procedure, -> (procedure) { includes(:user, :groupe_instructeur).where(groupe_instructeurs: { procedure: procedure }) }
|
||||
scope :for_api_v2, -> { includes(procedure: [:administrateurs], etablissement: [], individual: [], traitements: []) }
|
||||
|
||||
scope :with_notifications, -> (instructeur) do
|
||||
scope :with_notifications, -> do
|
||||
joins(:follows)
|
||||
.where('last_champ_updated_at > follows.demande_seen_at' \
|
||||
' OR groupe_instructeur_updated_at > follows.demande_seen_at' \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue