Add specs for api/v1/rooms_controller & api/v1/tracks_controller

and cleanup api/v1/tracks and api/v1/rooms controllers
This commit is contained in:
Nishanth Vijayan 2016-03-14 04:02:15 +05:30
parent 55cfc8ff60
commit 864245fec2
4 changed files with 77 additions and 5 deletions

View file

@ -5,7 +5,7 @@ module Api
respond_to :json
def index
@conference ? (tracks = @conference.program.tracks) : (tracks = Track.all)
tracks = @conference ? @conference.program.tracks : Track.all
respond_with tracks
end