def destroy
      @term = Term.find(params[:id])
      # return url will be different for either tag or category
      redirect_url = Term.get_redirect_url({ type_taxonomy: @term.term_anatomy.taxonomy })
      @term.destroy

      respond_to do |format|
        format.html { redirect_to URI.parse(redirect_url).path, notice: I18n.t("controllers.admin.terms.destroy.flash.success") }
      end
    end
def destroy
      @term = Term.find(params[:id])
      # return url will be different for either tag or category
      redirect_url = Term.get_redirect_url({ type_taxonomy: @term.term_anatomy.taxonomy })
      @term.destroy

      respond_to do |format|
        format.html { redirect_to URI.parse(redirect_url).path, notice: I18n.t("controllers.admin.terms.destroy.flash.success") }
      end
    end
delete the term