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