36ee253a1a
We had client-side notification stacking in the tray since launch, but now we want to stack notifications in the notifications page, in API responses and in email bundles.
10 lines
368 B
Ruby
10 lines
368 B
Ruby
class Notifications::TraysController < ApplicationController
|
|
def show
|
|
@notifications = Current.user.notifications.unread.preloaded.ordered.limit(100)
|
|
|
|
# Invalidate on the whole set instead of the unread set since the max updated at in the unread set
|
|
# can stay the same when reading old notifications.
|
|
fresh_when Current.user.notifications
|
|
end
|
|
end
|