From 8ff71b265078ff96795be506ddf9f1c9ea7606d1 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Wed, 16 Apr 2025 16:21:31 +0200 Subject: [PATCH] Dont turbo stream when coming from a read_all redirect --- app/controllers/notifications_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/controllers/notifications_controller.rb b/app/controllers/notifications_controller.rb index 83e5db488..cbce6a92d 100644 --- a/app/controllers/notifications_controller.rb +++ b/app/controllers/notifications_controller.rb @@ -5,5 +5,10 @@ class NotificationsController < ApplicationController if @page.first? @unread = Current.user.notifications.unread.ordered end + + respond_to do |format| + format.turbo_stream if current_page_param + format.html + end end end