Contest language & top buttons
All checks were successful
CI / scan_ruby (push) Successful in 18s
CI / scan_js (push) Successful in 13s
CI / lint (push) Successful in 13s
CI / test (push) Successful in 33s

This commit is contained in:
sto
2025-06-20 08:07:39 +02:00
parent 71f2bb6b70
commit ac3b354480
13 changed files with 83 additions and 49 deletions

View File

@@ -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