Add contest param for offline form participation
Some checks failed
CI / scan_ruby (push) Successful in 20s
CI / scan_js (push) Successful in 15s
CI / lint (push) Failing after 13s
CI / test (push) Successful in 38s

This commit is contained in:
sto
2025-10-30 10:30:32 +01:00
parent 35ad7da355
commit aea001cdf6
9 changed files with 30 additions and 3 deletions

View File

@@ -101,7 +101,7 @@ class ContestsController < ApplicationController
def offline_new
@contest = Contest.find_by(slug: params[:id])
unless @contest && @contest.public
unless @contest && @contest.offline_form
skip_authorization
not_found and return
end
@@ -127,7 +127,7 @@ class ContestsController < ApplicationController
end
def contest_params
params.expect(contest: [ :lang, :name, :public, :team, :allow_registration ])
params.expect(contest: [ :lang, :name, :offline_form, :public, :team, :allow_registration ])
end
def filter_contestants_per_category