Add flash notice when adding another card
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user