app/models/tramway/event/event.rb in tramway-event-1.12.3.8 vs app/models/tramway/event/event.rb in tramway-event-1.12.3.9

- old
+ new

@@ -20,10 +20,10 @@ has_many :actions, -> { order(id: :asc) }, class_name: 'Tramway::Event::Action' has_and_belongs_to_many :places enumerize :reach, default: :open, in: %i[open closed] - scope :actual, -> { where('begin_date > ?', DateTime.now).where('begin_date < ?', DateTime.now + 2.days) } + scope :actual, -> { where('begin_date > ?', DateTime.now).where('begin_date < ?', DateTime.now + 11.days).order(begin_date: :asc) } scope :past, -> { where 'end_date < ?', DateTime.now } scope :open, -> { where reach: :open } scope :closed, -> { where reach: :closed } validates :begin_date, presence: true