room resources

This commit is contained in:
Josh
2018-05-29 16:51:18 -04:00
parent 32ec2bacce
commit de44d8024b
5 changed files with 25 additions and 14 deletions

View File

@ -11,8 +11,13 @@ class RoomsController < ApplicationController
room.user = current_user
if room.save
redirect_to room
if room_params[:auto_join] == "1"
redirect_to start_room_path(room)
else
redirect_to room
end
else
# Handle room didn't save.
end
end
@ -45,6 +50,13 @@ class RoomsController < ApplicationController
end
end
# DELETE /r/:room_uid
def destroy
@room.destroy
redirect_to root_path
end
# GET /r/:room_uid/start
def start
# Join the user in and start the meeting.