discussion_note.rb 294 Bytes
Newer Older
Douwe Maan's avatar
Douwe Maan committed
1
# A note in a non-diff discussion on an issue, merge request, commit, or snippet
2
class DiscussionNote < Note
3
  NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
4 5 6 7 8 9 10

  validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }

  def discussion_class(*)
    SimpleDiscussion
  end
end