Skip to content

Commit dfcc60c

Browse files
committed
Use Time.current in event scopes
1 parent 1e32636 commit dfcc60c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/models/better_together/event.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,12 @@ class Event < ApplicationRecord
3636
}
3737

3838
scope :upcoming, lambda {
39-
start_query = arel_table[:starts_at].gteq(DateTime.now)
39+
start_query = arel_table[:starts_at].gteq(Time.current)
4040
where(start_query)
4141
}
4242

4343
scope :past, lambda {
44-
start_query = arel_table[:starts_at].lt(DateTime.now)
44+
start_query = arel_table[:starts_at].lt(Time.current)
4545
where(start_query)
4646
}
4747

0 commit comments

Comments
 (0)