f58a1aeb31
Mobile team needs this. Also, this lets us get rid from some conditionals for handling both modes with a single template. https://3.basecamp.com/2914079/buckets/44843469/messages/9437287330
20 lines
400 B
Ruby
20 lines
400 B
Ruby
class Cards::PublishesController < ApplicationController
|
|
include CardScoped
|
|
|
|
def create
|
|
@card.publish
|
|
|
|
if add_another_param?
|
|
card = @board.cards.create!(status: :drafted)
|
|
redirect_to card_draft_path(card), notice: "Card added"
|
|
else
|
|
redirect_to @card.board
|
|
end
|
|
end
|
|
|
|
private
|
|
def add_another_param?
|
|
params[:creation_type] == "add_another"
|
|
end
|
|
end
|