summaryrefslogtreecommitdiff
path: root/app/models/discussion_note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-04-06 10:05:57 -0500
committerDouwe Maan <douwe@selenight.nl>2017-04-06 10:51:45 -0500
commitcc656a11992483911cefe035d579096581cfde57 (patch)
tree5af4a41d9ae36b3900fdfa0b312b125995c8818c /app/models/discussion_note.rb
parent64c1735c22871d94e0bda8b9f5aece2a29739236 (diff)
downloadgitlab-ce-cc656a11992483911cefe035d579096581cfde57.tar.gz
Refactor resolvability checks based on type
Diffstat (limited to 'app/models/discussion_note.rb')
-rw-r--r--app/models/discussion_note.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/discussion_note.rb b/app/models/discussion_note.rb
index 337fbc8435c..e660b024083 100644
--- a/app/models/discussion_note.rb
+++ b/app/models/discussion_note.rb
@@ -1,7 +1,9 @@
-# A note in a non-diff discussion on an issue, merge request, commit, or snippet
+# A note in a non-diff discussion on an issue, merge request, commit, or snippet.
+#
+# A note of this type can be resolvable.
class DiscussionNote < Note
+ # Names of all implementers of `Noteable` that support discussions.
NOTEABLE_TYPES = %w(MergeRequest Issue Commit Snippet).freeze
- RESOLVABLE_TYPES = %w(MergeRequest).freeze
validates :noteable_type, inclusion: { in: NOTEABLE_TYPES }