Clarify a bit

This commit is contained in:
David Heinemeier Hansson
2025-04-16 17:01:32 +02:00
parent d8ec2c3364
commit 2ced8e643d
+2 -2
View File
@@ -9,7 +9,7 @@ class Notification < ApplicationRecord
scope :ordered, -> { order(read_at: :desc, created_at: :desc) }
delegate :creator, to: :event
after_create_commit :broadcast
after_create_commit :broadcast_unread
def self.read_all
update!(read_at: Time.current)
@@ -24,7 +24,7 @@ class Notification < ApplicationRecord
end
private
def broadcast
def broadcast_unread
broadcast_prepend_later_to user, :notifications, target: "notifications"
end
end