Contest language & top buttons
This commit is contained in:
@@ -70,6 +70,8 @@ class ContestsController < ApplicationController
|
||||
end
|
||||
authorize @contest
|
||||
|
||||
I18n.locale = @contest.lang
|
||||
|
||||
@title = I18n.t("contests.scoreboard.title", name: @contest.name)
|
||||
@contestants = @contest.contestants.sort_by { |contestant| [ -contestant.completions.size, contestant.time_seconds ] }
|
||||
@puzzles = @contest.puzzles.order(:id)
|
||||
@@ -89,6 +91,6 @@ class ContestsController < ApplicationController
|
||||
end
|
||||
|
||||
def contest_params
|
||||
params.expect(contest: [ :name, :team, :allow_registration ])
|
||||
params.expect(contest: [ :lang, :name, :team, :allow_registration ])
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user