new modes

This commit is contained in:
kb6e
2025-08-25 20:17:44 +02:00
parent 6fbd24e36e
commit 6385c39c10
38 changed files with 385 additions and 302 deletions

View File

@@ -43,4 +43,7 @@ class Party < ApplicationRecord
scope :featured, -> { where(featured: true) } # Get featured parties for homepage
scope :published, -> { where(state: :published) } # Get publicly visible parties
scope :search_by_name, ->(query) { where("name ILIKE ?", "%#{query}%") } # Search by name (case-insensitive)
# Scope for published parties ordered by start time
scope :upcoming, -> { published.where("start_time >= ?", Time.current).order(start_time: :asc) }
end