refactor Dossier#with_notifications
This commit is contained in:
parent
d01a53eb72
commit
f96377d878
6 changed files with 15 additions and 15 deletions
|
@ -91,7 +91,7 @@ class ProcedurePresentation < ApplicationRecord
|
|||
|
||||
case table
|
||||
when 'notifications'
|
||||
dossiers_id_with_notification = dossiers.merge(instructeur.followed_dossiers).with_notifications(instructeur).ids
|
||||
dossiers_id_with_notification = dossiers.merge(instructeur.followed_dossiers).with_notifications.ids
|
||||
if order == 'desc'
|
||||
return dossiers_id_with_notification +
|
||||
(dossiers.order('dossiers.updated_at desc').ids - dossiers_id_with_notification)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue