2017-04-06 11:05:57 -04: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-09 20:29:11 -05:00
|
|
|
class DiscussionNote < Note
|
2017-04-06 11:05:57 -04:00
|
|
|
# Names of all implementers of `Noteable` that support discussions.
|
2017-03-15 20:58:55 -04:00
|
|
|
NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
|
2017-03-09 20:29:11 -05:00
|
|
|
|
|
|
|
validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }
|
|
|
|
|
|
|
|
def discussion_class(*)
|
2017-04-04 18:27:23 -04:00
|
|
|
Discussion
|
2017-03-09 20:29:11 -05:00
|
|
|
end
|
|
|
|
end
|