Files
fizzy/app/controllers/notifications_controller.rb
T
2025-11-17 16:16:19 +01:00

12 lines
407 B
Ruby

class NotificationsController < ApplicationController
def index
@unread = Current.user.notifications.unread.ordered.preloaded unless current_page_param
set_page_and_extract_portion_from Current.user.notifications.read.ordered.preloaded
respond_to do |format|
format.turbo_stream if current_page_param # Allows read-all action to side step pagination
format.html
end
end
end