[fix] live_events return json; use the provided happening_now? function

This commit is contained in:
Jimmy 2021-03-17 07:34:42 +08:00
parent c966177a76
commit 034313cccb
3 changed files with 2 additions and 12 deletions

View file

@ -337,10 +337,6 @@ class Event < ApplicationRecord
time <=> other.time
end
def live?
time >= Time.now && Time.now <= time + event_type.length
end
private
##