2014-06-26 15:43:24 +03:00
|
|
|
module Api
|
|
|
|
|
module V1
|
|
|
|
|
class EventsController < Api::BaseController
|
2016-02-27 17:03:43 +05:30
|
|
|
load_resource :conference, find_by: :short_title
|
2014-06-26 15:43:24 +03:00
|
|
|
respond_to :json
|
2013-07-08 10:07:12 +02:00
|
|
|
|
2014-06-26 15:43:24 +03:00
|
|
|
def index
|
2014-08-27 16:18:35 +02:00
|
|
|
events = Event.includes(:conference, :track, :room, :event_type, event_users: :user)
|
2016-02-27 17:03:43 +05:30
|
|
|
|
|
|
|
|
if @conference
|
|
|
|
|
events = events.where(conference: @conference)
|
2014-06-26 15:43:24 +03:00
|
|
|
end
|
2016-02-27 17:03:43 +05:30
|
|
|
|
2014-06-26 15:43:24 +03:00
|
|
|
respond_with events.confirmed
|
|
|
|
|
end
|
2013-07-08 10:07:12 +02:00
|
|
|
end
|
|
|
|
|
end
|
|
|
|
|
end
|