osem-fcy/app/controllers/api/v1/conferences_controller.rb

13 lines
331 B
Ruby
Raw Normal View History

class Api::V1::ConferencesController < Api::BaseController
respond_to :json
def index
if params[:conference_id].blank?
conferences = Conference.all
else
conferences = Conference.find_all_by_guid(params[:conference_id])
end
2014-07-21 14:49:05 +02:00
render json: conferences, serializer: ConferencesArraySerializer
end
end