From e93e5fbe63d89e2ea546fbb294d8d96e06ef39f1 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Mon, 5 Nov 2018 09:24:51 +0000 Subject: [PATCH] Allow note comments with no body --- app/models/note_comment.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/note_comment.rb b/app/models/note_comment.rb index c9caa1b85..1772b3f97 100644 --- a/app/models/note_comment.rb +++ b/app/models/note_comment.rb @@ -33,7 +33,7 @@ class NoteComment < ActiveRecord::Base validates :visible, :inclusion => [true, false] validates :author, :associated => true validates :event, :inclusion => %w[opened closed reopened commented hidden] - validates :body, :allow_blank => false, :length => { :maximum => 2000 }, + validates :body, :length => { :maximum => 2000 }, :format => /\A[^\x00-\x08\x0b-\x0c\x0e-\x1f\x7f\ufffe\uffff]*\z/ # Return the comment text -- 2.43.2