From e610bc981e9d433d6da40db151a721cf233e3507 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 3 Oct 2025 18:25:04 +0200 Subject: [PATCH] Handle update with a page refresh so that both the list of subscribers and the bell update on the same operation We can optimize with streams separately, this fixes a bug --- app/controllers/cards/watches_controller.rb | 4 ++-- app/views/cards/container/footer/_published.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/controllers/cards/watches_controller.rb b/app/controllers/cards/watches_controller.rb index bd956a2d5..7556e2000 100644 --- a/app/controllers/cards/watches_controller.rb +++ b/app/controllers/cards/watches_controller.rb @@ -3,11 +3,11 @@ class Cards::WatchesController < ApplicationController def create @card.watch_by Current.user - redirect_to card_watch_path(@card) + redirect_back_or_to @card end def destroy @card.unwatch_by Current.user - redirect_to card_watch_path(@card) + redirect_back_or_to @card end end diff --git a/app/views/cards/container/footer/_published.html.erb b/app/views/cards/container/footer/_published.html.erb index c4e0a0cdf..c227f7f3c 100644 --- a/app/views/cards/container/footer/_published.html.erb +++ b/app/views/cards/container/footer/_published.html.erb @@ -1,7 +1,7 @@ <%# FIXME: Let's move this aside outside of the card container section so these frames don't reload/flicker when card is replaced %> <%= render "cards/container/closure", card: card %>