forked from External/greenlight
Included missing assets and fixed room delete 404 (#939)
This commit is contained in:
committed by
farhatahmad
parent
3f8ffa61d7
commit
e15e119d5d
@ -128,6 +128,11 @@ class RoomsController < ApplicationController
|
||||
else
|
||||
flash[:success] = I18n.t("room.delete.success")
|
||||
end
|
||||
|
||||
# Redirect to home room if the redirect_back location is the deleted room
|
||||
return redirect_to @current_user.main_room if request.referer == room_url(@room)
|
||||
|
||||
# Redirect to the location that the user deleted the room from
|
||||
redirect_back fallback_location: current_user.main_room
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user