clarion/app/controllers/api/events_controller.rb
2015-10-05 15:24:37 +03:00

15 lines
289 B
Ruby

class Api::EventsController < Api::ApplicationController
def index
@conference = find_conference
@events = @conference.events.includes(:track)
render json: @events, include: :track
end
private
def find_conference
Conference.find params[:conference_id]
end
end