Fixed a bug that was preventing deleting sites

This commit is contained in:
Mario Visic 2011-02-26 21:12:26 +08:00
parent 2244aa782a
commit 1c04b39c7e

View File

@ -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