Dirette: nasconde partite programmate nel passato.
La pagina /live mostrava tutte le partite da inizio giornata; ora solo con orario futuro. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -7,9 +7,9 @@ class Match < ApplicationRecord
|
||||
validates :opponent_name, presence: true
|
||||
validates :sets_to_win, numericality: { greater_than: 0, less_than: 6 }
|
||||
|
||||
# Partite con data/ora: da inizio giornata (Europe/Rome) in poi — allineato alla pagina Partite.
|
||||
# Partite ancora da giocare in diretta (orario nel futuro).
|
||||
scope :scheduled_for_live, -> {
|
||||
where.not(scheduled_at: nil).where("scheduled_at >= ?", Time.zone.now.beginning_of_day)
|
||||
where.not(scheduled_at: nil).where("scheduled_at >= ?", Time.zone.now)
|
||||
}
|
||||
|
||||
scope :scheduled_upcoming, -> { scheduled_for_live }
|
||||
|
||||
Reference in New Issue
Block a user