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