From 1c04b39c7eb950be1d9581bfedaf20d3d2193736 Mon Sep 17 00:00:00 2001 From: Mario Visic Date: Sat, 26 Feb 2011 21:12:26 +0800 Subject: [PATCH] Fixed a bug that was preventing deleting sites --- app/controllers/admin/sites_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/admin/sites_controller.rb b/app/controllers/admin/sites_controller.rb index 001758df..2ef3210c 100644 --- a/app/controllers/admin/sites_controller.rb +++ b/app/controllers/admin/sites_controller.rb @@ -13,7 +13,7 @@ module Admin end def destroy - @site = current_admin.sites.detect { |s| s._id == params[:id] } + @site = current_admin.sites.find(params[:id]) if @site != current_site @site.destroy