json API for suseconferenceclient

This commit is contained in:
Ancor Gonzalez Sosa 2013-07-08 10:07:12 +02:00
parent d648ab7cb5
commit d95d8f234b
12 changed files with 159 additions and 8 deletions

View file

@ -0,0 +1,11 @@
class Api::V1::EventsController < Api::BaseController
respond_to :json
def index
events = Event.includes(:conference, :track, :room, :event_type, {:event_people => :person})
unless params[:conference_id].blank?
events = events.where("conferences.guid" => params[:conference_id])
end
respond_with events
end
end