forked from External/greenlight
add delete confirmation modal
This commit is contained in:
@ -65,8 +65,9 @@ class RoomsController < ApplicationController
|
||||
|
||||
# DELETE /:room_uid
|
||||
def destroy
|
||||
p @room
|
||||
# Don't delete the users home room.
|
||||
@room.destroy if @room != current_user.main_room
|
||||
@room.destroy if @room.owned_by?(current_user) && @room != current_user.main_room
|
||||
|
||||
redirect_to current_user.main_room
|
||||
end
|
||||
|
Reference in New Issue
Block a user