2015-10-05 15:24:37 +03:00
|
|
|
class Api::EventsController < Api::ApplicationController
|
|
|
|
def index
|
|
|
|
@conference = find_conference
|
2015-10-05 15:29:22 +03:00
|
|
|
@events = @conference.events.includes(:track, :event_type)
|
2015-10-05 15:24:37 +03:00
|
|
|
|
2015-10-05 15:29:22 +03:00
|
|
|
render json: @events, include: [:track, :event_type]
|
2015-10-05 15:24:37 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
|
|
|
|
def find_conference
|
|
|
|
Conference.find params[:conference_id]
|
|
|
|
end
|
|
|
|
end
|