Destroy NotificationRequest
s that are dismissed (#31008)
This commit is contained in:
parent
c929b4cace
commit
35a437a03f
9 changed files with 57 additions and 40 deletions
|
@ -31,6 +31,6 @@ class NotificationPolicy < ApplicationRecord
|
|||
private
|
||||
|
||||
def pending_notification_requests
|
||||
@pending_notification_requests ||= notification_requests.where(dismissed: false).limit(MAX_MEANINGFUL_COUNT).pick(Arel.sql('count(*), coalesce(sum(notifications_count), 0)::bigint'))
|
||||
@pending_notification_requests ||= notification_requests.limit(MAX_MEANINGFUL_COUNT).pick(Arel.sql('count(*), coalesce(sum(notifications_count), 0)::bigint'))
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue