Add a Happening Now View

This commit is contained in:
Michael Ball 2020-07-30 22:31:45 -07:00
parent 0d4733b130
commit 70bde86dd6
8 changed files with 80 additions and 9 deletions

View file

@ -274,6 +274,14 @@ class Event < ApplicationRecord
event_schedules.find_by(schedule_id: selected_schedule_id).try(:start_time)
end
##
# Returns the start time at which this event is scheduled
#
def happening_now?
event_schedules.find_by(schedule_id: selected_schedule_id).try(:happening_now?)
end
##
# Returns true or false, if the event is already over or not
#