diff options
author | Douwe Maan <douwe@selenight.nl> | 2017-04-06 10:05:57 -0500 |
---|---|---|
committer | Douwe Maan <douwe@selenight.nl> | 2017-04-06 10:51:45 -0500 |
commit | cc656a11992483911cefe035d579096581cfde57 (patch) | |
tree | 5af4a41d9ae36b3900fdfa0b312b125995c8818c /app/models/discussion_note.rb | |
parent | 64c1735c22871d94e0bda8b9f5aece2a29739236 (diff) | |
download | gitlab-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.rb | 6 |
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 } |