2017-04-06 15:05:57 +00:00
|
|
|
# A note in a non-diff discussion on an issue, merge request, commit, or snippet.
|
|
|
|
#
|
|
|
|
# A note of this type can be resolvable.
|
2017-03-10 01:29:11 +00:00
|
|
|
class DiscussionNote < Note
|
2017-04-06 15:05:57 +00:00
|
|
|
# Names of all implementers of `Noteable` that support discussions.
|
2017-03-16 00:58:55 +00:00
|
|
|
NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
|
2017-03-10 01:29:11 +00:00
|
|
|
|
|
|
|
validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }
|
|
|
|
|
|
|
|
def discussion_class(*)
|
2017-04-04 22:27:23 +00:00
|
|
|
Discussion
|
2017-03-10 01:29:11 +00:00
|
|
|
end
|
|
|
|
end
|