79c9ea2ce1
related to notification and comment rendering
10 lines
368 B
Ruby
10 lines
368 B
Ruby
class Notifications::TraysController < ApplicationController
|
|
def show
|
|
@notifications = Current.user.notifications.preloaded.unread.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
|