[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 committed by CactusPuppy
parent 25af736868
commit 7fe1c597ff
No known key found for this signature in database
GPG key ID: 4B33B0A3E15E2C82
3 changed files with 2 additions and 12 deletions

View file

@ -785,13 +785,7 @@ class Conference < ApplicationRecord
end
def find_live_events
live_events = []
program.events.each do |event|
if event.live?
live_events.append(event)
end
end
live_events
program.events.select(&:happening_now?)
end
private