diff --git a/app/assets/stylesheets/rooms.scss b/app/assets/stylesheets/rooms.scss index 42daca51..6066d2db 100644 --- a/app/assets/stylesheets/rooms.scss +++ b/app/assets/stylesheets/rooms.scss @@ -7,7 +7,7 @@ } .thumbnail { - height: 40% !important; + height: 60px !important; width: auto; } @@ -22,3 +22,7 @@ .home-indicator { font-size: 22px !important; } + +.btn-del-room { + width: 70% !important; +} diff --git a/app/controllers/rooms_controller.rb b/app/controllers/rooms_controller.rb index e922f36b..57569b3a 100644 --- a/app/controllers/rooms_controller.rb +++ b/app/controllers/rooms_controller.rb @@ -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 diff --git a/app/views/main/index.html.erb b/app/views/main/index.html.erb index 5ce4ab45..57ca2794 100644 --- a/app/views/main/index.html.erb +++ b/app/views/main/index.html.erb @@ -12,7 +12,7 @@