Make public contestant forms activated only when organizers code are set
#20
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user