redo rooms page

This commit is contained in:
Josh
2018-05-31 15:04:18 -04:00
parent 9e5250353b
commit ede80075c1
27 changed files with 258 additions and 154 deletions

View File

@ -48,7 +48,7 @@ class RoomsController < ApplicationController
# POST /r/:room_uid
def join
opts = default_meeting_options
# If you're unauthenticated, you must enter a name to join the meeting.
if params[:join_name]
redirect_to @room.join_path(params[:join_name], opts)
@ -57,9 +57,9 @@ class RoomsController < ApplicationController
# DELETE /r/:room_uid
def destroy
@room.destroy
@room.destroy unless @room == current_user.main_room
redirect_to root_path
redirect_to current_user.main_room
end
# GET /r/:room_uid/start
@ -87,7 +87,11 @@ class RoomsController < ApplicationController
# GET /r/:room_uid/logout
def logout
# Redirect the owner to their room.
redirect_to root_path
if current_user
redirect_to current_user.main_room
else
redirect_to root_path
end
end
# GET /r/:room_uid/sessions