Skip to content

Commit acda8b9

Browse files
authored
Merge pull request #2515 from codebar/fix-events-not-showing
Override default scope for Workshop
2 parents fde6023 + 0a28c11 commit acda8b9

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

app/models/concerns/listable.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ module Listable
44
extend ActiveSupport::Concern
55

66
included do
7-
scope :today_and_upcoming, -> { where('date_and_time >= ?', Time.zone.today).order(date_and_time: :asc) }
8-
scope :upcoming, -> { where('date_and_time >= ?', Time.zone.now).order(date_and_time: :asc) }
7+
scope :today_and_upcoming, -> { where('date_and_time >= ?', Time.zone.today).reorder(date_and_time: :asc) }
8+
scope :upcoming, -> { where('date_and_time >= ?', Time.zone.now).reorder(date_and_time: :asc) }
99
scope :past, -> { where('date_and_time < ?', Time.zone.now).order(:date_and_time) }
1010
scope :recent, lambda {
1111
where('date_and_time < ?', Time.zone.now)

0 commit comments

Comments
 (0)