Make public contestant forms activated only when organizers code are set
All checks were successful
CI / scan_ruby (push) Successful in 16s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 35s

#20
This commit is contained in:
sto
2025-12-04 10:50:10 +01:00
parent d08370f5f8
commit a2a8a9fcef
3 changed files with 5 additions and 5 deletions

View File

@@ -144,7 +144,7 @@ class ContestantsController < ApplicationController
skip_authorization
@contestant = Contestant.find(params[:contestant_id])
if !@contestant
if !@contestant || !@contestant.contest.code.present?
not_found and return
end
@contest = @contestant.contest
@@ -161,7 +161,7 @@ class ContestantsController < ApplicationController
skip_authorization
@contestant = Contestant.find(params[:contestant_id])
if !@contestant
if !@contestant || !@contestant.contest.code.present?
not_found and return
end
@contest = @contestant.contest
@@ -191,7 +191,7 @@ class ContestantsController < ApplicationController
skip_authorization
@contestant = Contestant.find(params[:contestant_id])
if !@contestant
if !@contestant || !@contestant.contest.code.present?
not_found and return
end
I18n.locale = @contestant.contest.lang