clarion/app/controllers/api/events_controller.rb
2015-10-08 02:54:16 +03:00

14 lines
388 B
Ruby

class Api::EventsController < Api::ApplicationController
include ::CurrentConferenceAssigning
before_filter :require_current_conference!
def index
@events = current_conference.events.includes(:participations)
end
def halfnarp_friendly
@events = current_conference.events.includes(:track, :event_type)
render json: @events, include: [:track, :event_type]
end
end