From d9323fa3e7af97372f1ce0b5c49beddc3e7853f2 Mon Sep 17 00:00:00 2001 From: Jorge Manrubia Date: Fri, 13 Jun 2025 11:02:40 +0200 Subject: [PATCH] Add flash notice when adding another card --- app/controllers/cards/publishes_controller.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/cards/publishes_controller.rb b/app/controllers/cards/publishes_controller.rb index cd24ffdeb..298f8bbe4 100644 --- a/app/controllers/cards/publishes_controller.rb +++ b/app/controllers/cards/publishes_controller.rb @@ -4,7 +4,11 @@ class Cards::PublishesController < ApplicationController def create @card.publish - redirect_to add_another_param? ? @collection.cards.create! : @card + if add_another_param? + redirect_to @collection.cards.create!, notice: "Card added" + else + redirect_to @card + end end private