[feat] Use existing #happening_now method; respond to both html and json requests
This commit is contained in:
parent
034313cccb
commit
871457f65b
5 changed files with 5 additions and 12 deletions
|
|
@ -72,6 +72,11 @@ class SchedulesController < ApplicationController
|
|||
).select(&:happening_now?)
|
||||
@events_schedules = [] unless @events_schedules
|
||||
@current_time = Time.now.in_time_zone(@conference.timezone)
|
||||
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.json { render json: @events_schedules.to_json }
|
||||
end
|
||||
end
|
||||
|
||||
def app
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue