clarion/app/controllers/api/events_controller.rb

15 lines
447 B
Ruby
Raw Permalink Normal View History

class Api::EventsController < Api::ApplicationController
include ::CurrentConferenceAssigning
include ::PublicApiExposing
before_filter :require_current_conference!
def index
2016-08-27 17:11:20 +03:00
@events = current_conference.events.approved.joins(:proposition).includes(:participations)
end
def halfnarp_friendly
@events = current_conference.events.includes(:track, :event_type)
render json: @events, include: [:track, :event_type]
end
end