From 5b70320a6b64adf2d1e0be4bd7dc221a5ba80c95 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Thu, 30 Oct 2025 14:42:48 +0100 Subject: [PATCH] We don't need to be fancy here Redirect should be fine --- app/controllers/cards_controller.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/controllers/cards_controller.rb b/app/controllers/cards_controller.rb index b1e7727dc..12d784ec6 100644 --- a/app/controllers/cards_controller.rb +++ b/app/controllers/cards_controller.rb @@ -25,11 +25,7 @@ class CardsController < ApplicationController @card.update! card_params end - if @card.published? - render_card_replacement - else - redirect_to @card - end + redirect_to @card end def destroy @@ -57,8 +53,4 @@ class CardsController < ApplicationController def card_params params.expect(card: [ :status, :title, :description, :image, tag_ids: [] ]) end - - def render_card_replacement - render turbo_stream: turbo_stream.replace([ @card, :card_container ], partial: "cards/container", locals: { card: @card.reload }) - end end