def destroy
      @tag = LatoBlog::Tag.find_by(id: params[:id])
      return unless check_tag_presence

      if !@tag.destroy
        flash[:danger] = @tag.tag_parent.errors.full_messages.to_sentence
        redirect_to lato_blog.edit_tag_path(@tag.id)
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:tag_destroy_success]
      redirect_to lato_blog.categories_path(status: 'deleted')
    end
def destroy
      @tag = LatoBlog::Tag.find_by(id: params[:id])
      return unless check_tag_presence

      if !@tag.destroy
        flash[:danger] = @tag.tag_parent.errors.full_messages.to_sentence
        redirect_to lato_blog.edit_tag_path(@tag.id)
        return
      end

      flash[:success] = LANGUAGES[:lato_blog][:flashes][:tag_destroy_success]
      redirect_to lato_blog.categories_path(status: 'deleted')
    end
This function destroyes a tag.