BigW Consortium Gitlab

discussion_note.rb 402 Bytes
Newer Older
1 2 3
# A note in a non-diff discussion on an issue, merge request, commit, or snippet.
#
# A note of this type can be resolvable.
4
class DiscussionNote < Note
5
  # Names of all implementers of `Noteable` that support discussions.
6
  NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
7 8 9 10

  validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }

  def discussion_class(*)
Douwe Maan committed
11
    Discussion
12 13
  end
end