Improve completions
Some checks are pending
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2025-03-21 19:50:03 +01:00
parent 15e2493f87
commit 570e517c28
3 changed files with 11 additions and 3 deletions

View File

@@ -22,7 +22,7 @@ class CompletionsController < ApplicationController
redirect_to contest_path(@contest)
else
logger = Logger.new(STDOUT)
logger.info(@completion.errors.full_messages)
logger.info(@completion.errors)
@title = "New completion"
render :new, status: :unprocessable_entity
end
@@ -42,7 +42,11 @@ class CompletionsController < ApplicationController
def destroy
@completion.destroy
redirect_to contest_path(@contest)
if params[:contestant_id]
redirect_to contest_contestant_path(@contest, params[:contestant_id])
else
redirect_to contest_path(@contest)
end
end
private