mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Rooms belong to venue
This commit is contained in:
parent
feabbfbc99
commit
f840f2b3f0
31 changed files with 221 additions and 166 deletions
|
|
@ -5,8 +5,12 @@ module Api
|
|||
respond_to :json
|
||||
|
||||
def index
|
||||
@conference ? (rooms = @conference.rooms) : (rooms = Room.all)
|
||||
|
||||
if params[:conference_id].blank?
|
||||
rooms = Room.all
|
||||
else
|
||||
conference = Conference.find_by_guid(params[:conference_id])
|
||||
rooms = conference.venue.rooms if conference.venue
|
||||
end
|
||||
respond_with rooms
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue