def mark_as_spam
      comment = Comment.find(params[:id])
      comment.comment_approved = "S"
      comment.is_spam = "S"
      respond_to do |format|
        if comment.save
          format.html { redirect_to admin_comments_path, notice: I18n.t("controllers.admin.comments.mark_as_spam.flash.success") }
        else
          format.html { render action: "index" }
        end
      end
    end
def mark_as_spam
      comment = Comment.find(params[:id])
      comment.comment_approved = "S"
      comment.is_spam = "S"
      respond_to do |format|
        if comment.save
          format.html { redirect_to admin_comments_path, notice: I18n.t("controllers.admin.comments.mark_as_spam.flash.success") }
        else
          format.html { render action: "index" }
        end
      end
    end
mark_as_spam function is a button on the ui and so need its own function. The function simply marks the comment as spam against the record in the database.
 the record is then not visable unless you explicity tell the system that you want to see spam records.