blob: 337fbc8435c5b47b984562d1ed336fe0d9414322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
# A note in a non-diff discussion on an issue, merge request, commit, or snippet
class DiscussionNote < Note
NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
RESOLVABLE_TYPES = %w(MergeRequest).freeze
validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }
def discussion_class(*)
Discussion
end
end
|