Fix api/v1/events and api/v1/speakers controllers

This commit is contained in:
Nishanth Vijayan 2016-03-31 13:13:27 +05:30
parent 39a850cc39
commit 22714b0f11
2 changed files with 3 additions and 3 deletions

View file

@ -5,10 +5,10 @@ module Api
respond_to :json
def index
events = Event.includes(:conference, :track, :room, :event_type, event_users: :user)
events = Event.includes(:track, :room, :event_type, event_users: :user)
if @conference
events = events.where(conference: @conference)
events = events.where(program: @conference.program)
end
respond_with events.confirmed