Worlds: stop bets at midnight before the start of the competition
CI / scan_ruby (push) Waiting to run
CI / scan_js (push) Waiting to run
CI / lint (push) Waiting to run
CI / test (push) Waiting to run

This commit is contained in:
sto
2026-09-12 08:48:59 +02:00
parent 0b025c828b
commit 3b433b8a9d
4 changed files with 48 additions and 39 deletions
+3
View File
@@ -66,6 +66,9 @@ class WorldsController < ApplicationController
def create
authorize :world_bet
if DateTime.now > Time.new(2026, 9, 16, 23, 59, 59, "+02:00")
redirect_to "/wjpc_bets/#{@lang}/new" and return
end
@world_bet = WorldBet.new(world_bet_params)
@world_bet.score = 0
+4
View File
@@ -1,5 +1,9 @@
= render "worlds_nav"
- if DateTime.now > Time.new(2026, 9, 16, 23, 59, 59, "+02:00")
.alert.alert-warning role="alert"
= t("worlds.new.too_late_message")
- else
.alert.alert-warning role="alert"
= t("worlds.about.one_bet_message")
+1
View File
@@ -466,6 +466,7 @@ en:
message: To make a bet, you have to provide two ordered lists of 10 participants, one among all participants, and the other one only among French participants. The order matters! A score multiplier will be applied to each selected contestant (in parenthesis below). You can't select a participant twice on a list, but of course you can totally put a French contestant in both lists ;)
notice: The bet has been made!
tab: Make a bet!
too_late_message: Bets are now closed!
world_section: Bet over all participants
title: WJPC bets
view:
+1
View File
@@ -439,6 +439,7 @@ fr:
notice: Le pari est enregistré !
tab: Fais ton pari !
title: Nouveau pari
too_late_message: Les paris sont désormais fermés !
world_section: Pari sur l'ensemble des participant.e.s
title: Les paris des WJPC
view: