22 lines
413 B
Ruby
22 lines
413 B
Ruby
class Cards::ClosuresController < ApplicationController
|
|
include CardScoped
|
|
|
|
def create
|
|
@card.close
|
|
|
|
respond_to do |format|
|
|
format.turbo_stream { render_card_replacement }
|
|
format.json { head :no_content }
|
|
end
|
|
end
|
|
|
|
def destroy
|
|
@card.reopen
|
|
|
|
respond_to do |format|
|
|
format.turbo_stream { render_card_replacement }
|
|
format.json { head :no_content }
|
|
end
|
|
end
|
|
end
|