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

17 lines
403 B
Ruby
Raw Normal View History

2014-08-07 07:42:22 +03:00
module Api
module V1
class ConferencesController < Api::BaseController
respond_to :json
2014-08-07 07:42:22 +03:00
def index
if params[:conference_id].blank?
conferences = Conference.all
else
2015-10-17 16:57:48 +03:00
conferences = Conference.find_by(short_title: params[:conference_id])
2014-08-07 07:42:22 +03:00
end
render json: conferences, serializer: ConferencesArraySerializer
end
end
end
end