Skip to content

Commit

Permalink
Allow note comments with no body
Browse files Browse the repository at this point in the history
  • Loading branch information
tomhughes committed Nov 5, 2018
1 parent c42900f commit e93e5fb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/note_comment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

3 comments on commit e93e5fb

@mmd-osm
Copy link
Collaborator

@mmd-osm mmd-osm commented on e93e5fb Nov 5, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did that break something?

@tomhughes
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes - hiding a note adds a comment and moderators often don't bother with a comment and just hit the "Hide" button.

@gravitystorm
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Notes, note comments and the status of notes all needs a big refactoring - the concepts are all jumbled up and simply make life more difficult. It's on my (eventual) todo list.

Please sign in to comment.