2018-05-07 16:47:29 -07:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
2014-08-07 07:42:22 +03:00
|
|
|
module Api
|
|
|
|
|
module V1
|
|
|
|
|
class ConferencesController < Api::BaseController
|
2015-10-25 00:36:23 +03:00
|
|
|
load_resource find_by: :short_title
|
2014-08-07 07:42:22 +03:00
|
|
|
respond_to :json
|
2013-07-04 14:02:50 +02:00
|
|
|
|
2016-09-15 20:33:44 -07:00
|
|
|
# Disable forgery protection for any json requests. This is required for jsonp support
|
|
|
|
|
skip_before_action :verify_authenticity_token
|
|
|
|
|
|
2014-08-07 07:42:22 +03:00
|
|
|
def index
|
2016-09-11 22:27:30 -07:00
|
|
|
render json: @conferences, serializer: ConferencesArraySerializer, callback: params['callback']
|
2015-10-25 00:36:23 +03:00
|
|
|
end
|
|
|
|
|
|
|
|
|
|
def show
|
2016-09-11 22:27:30 -07:00
|
|
|
render json: [@conference], serializer: ConferencesArraySerializer, callback: params['callback']
|
2014-08-07 07:42:22 +03:00
|
|
|
end
|
2013-07-16 17:04:48 +02:00
|
|
|
end
|
2013-07-04 14:02:50 +02:00
|
|
|
end
|
|
|
|
|
end
|