[refractor]Use ? methods instead of boolean variables; rename happening_next? to happening_later?

This commit is contained in:
Jimmy 2021-04-17 08:30:07 +08:00 committed by CactusPuppy
parent 5aea1efab1
commit 47e580904d
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
6 changed files with 18 additions and 18 deletions

View file

@ -70,7 +70,7 @@ class EventSchedule < ApplicationRecord
event_time_range.overlaps?(now_range)
end
def happening_next?
def happening_later?
# TODO: Save start_time with local timezone info when making an event schedule
in_tz_start = start_time.in_time_zone(timezone)
in_tz_start -= in_tz_start.utc_offset