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
|
@ -9,12 +9,13 @@
|
|||
# from_account_id :bigint(8) not null
|
||||
# last_status_id :bigint(8)
|
||||
# notifications_count :bigint(8) default(0), not null
|
||||
# dismissed :boolean default(FALSE), not null
|
||||
# created_at :datetime not null
|
||||
# updated_at :datetime not null
|
||||
#
|
||||
|
||||
class NotificationRequest < ApplicationRecord
|
||||
self.ignored_columns += %w(dismissed)
|
||||
|
||||
include Paginable
|
||||
|
||||
MAX_MEANINGFUL_COUNT = 100
|
||||
|
@ -34,8 +35,6 @@ class NotificationRequest < ApplicationRecord
|
|||
end
|
||||
|
||||
def reconsider_existence!
|
||||
return if dismissed?
|
||||
|
||||
prepare_notifications_count
|
||||
|
||||
if notifications_count.positive?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue