def update
      @category = Term.find(params[:id])
      @category.deal_with_cover(params[:has_cover_image])
      respond_to do |format|
        # deal with abnormalaties - update the structure url
        if @category.update_attributes(term_params)
          format.html { redirect_to edit_admin_term_path(@category), notice: I18n.t("controllers.admin.terms.update.flash.success", term: Term.get_type_of_term(params)) }
        else
          format.html {
            render action: "edit"
          }
        end

      end
    end
def update
      @category = Term.find(params[:id])
      @category.deal_with_cover(params[:has_cover_image])
      respond_to do |format|
        # deal with abnormalaties - update the structure url
        if @category.update_attributes(term_params)
          format.html { redirect_to edit_admin_term_path(@category), notice: I18n.t("controllers.admin.terms.update.flash.success", term: Term.get_type_of_term(params)) }
        else
          format.html {
            render action: "edit"
          }
        end

      end
    end
update the term record with the given parameters