Files
fizzy/app/controllers/cards/publishes_controller.rb
T
Jorge Manrubia f58a1aeb31 Use a dedicated resource for showing cards in draft mode
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
2026-01-08 10:40:21 +01:00

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