Add flash notice when adding another card

This commit is contained in:
Jorge Manrubia
2025-06-13 11:02:40 +02:00
parent a7cdf964dd
commit d9323fa3e7
@@ -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