Require contest durations, prefill end times for unfinished puzzles & allow to modify them
Some checks failed
CI / scan_ruby (push) Successful in 19s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 14s
CI / test (push) Failing after 44s

This commit is contained in:
sto
2025-11-18 11:46:02 +01:00
parent 63a88ea113
commit 3dd153d587
8 changed files with 19 additions and 18 deletions

View File

@@ -57,6 +57,7 @@ class ContestsController < ApplicationController
@contest = Contest.new
@title = I18n.t("contests.new.title")
@nonav = true
end
def create
@@ -69,6 +70,8 @@ class ContestsController < ApplicationController
if @contest.save
redirect_to "/contests/#{@contest.id}/settings/general", notice: t("contests.new.notice")
else
@title = I18n.t("contests.new.title")
@nonav = true
render :new, status: :unprocessable_entity
end
end
@@ -203,7 +206,7 @@ class ContestsController < ApplicationController
end
def new_contest_params
params.expect(contest: [ :name ])
params.expect(contest: [ :name, :duration ])
end
def settings_general_params