app/models/tramway/event/event.rb in tramway-event-1.9.27.5 vs app/models/tramway/event/event.rb in tramway-event-1.9.27.6
- old
+ new
@@ -11,10 +11,10 @@
has_many :organizations, as: :partners, through: :partnerships, class_name: 'Tramway::Partner::Organization'
has_and_belongs_to_many :places
enumerize :status, default: :common, in: %i[common main]
- scope :main_event, -> { where(status: :main) }
+ scope :main_event, -> { active.where(status: :main) }
scope :actual, -> { where 'end_date > ?', DateTime.now }
scope :past, -> { where 'end_date < ?', DateTime.now }
def request_collecting_state
return :not_initialized unless request_collecting_begin_date.present? || request_collecting_end_date.present?