implementation in progress
This commit is contained in:
parent
f3db1288cf
commit
018bbff7b8
4 changed files with 12 additions and 2 deletions
|
|
@ -112,6 +112,14 @@ class ConferencesController < ApplicationController
|
|||
end
|
||||
end
|
||||
|
||||
def live_events
|
||||
conference = Conference.find_by(short_title: params[:conference_id])
|
||||
temp = conference.find_live_events
|
||||
p "TESTTEST"
|
||||
p temp.size()
|
||||
p temp.to_json()
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def conference_finder_conditions
|
||||
|
|
|
|||
|
|
@ -784,7 +784,7 @@ class Conference < ApplicationRecord
|
|||
end_date < Time.current
|
||||
end
|
||||
|
||||
def find_live_events()
|
||||
def find_live_events
|
||||
live_events = []
|
||||
for event in program.events
|
||||
if event.is_live?
|
||||
|
|
|
|||
|
|
@ -338,7 +338,7 @@ class Event < ApplicationRecord
|
|||
end
|
||||
|
||||
def is_live?
|
||||
start_time >= Time.now && Time.now <= start_time + event_type.length
|
||||
time() >= Time.now && Time.now <= time() + event_type.length
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue