Files
osem/app/controllers/api/v1/rooms_controller.rb
Nishanth Vijayan 864245fec2 Add specs for api/v1/rooms_controller & api/v1/tracks_controller
and cleanup api/v1/tracks and api/v1/rooms controllers
2016-03-15 00:57:15 +05:30

17 lines
353 B
Ruby

module Api
module V1
class RoomsController < Api::BaseController
load_resource :conference, find_by: :short_title
respond_to :json
def index
if @conference
respond_with @conference.venue ? @conference.venue.rooms : Room.none
else
respond_with Room.all
end
end
end
end
end