osem-fcy/app/controllers/api/v1/tracks_controller.rb
Aditya Chatterjee a5a2db4077 update
2016-02-27 17:03:43 +05:30

14 lines
299 B
Ruby

module Api
module V1
class TracksController < Api::BaseController
load_resource :conference, find_by: :short_title
respond_to :json
def index
@conference ? (tracks = @conference.tracks) : (tracks = Track.all)
respond_with tracks
end
end
end
end