diff options
author | Sean McGivern <sean@gitlab.com> | 2018-10-26 14:23:58 +0100 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-10-26 14:23:58 +0100 |
commit | 93d0bacfe5eca0099a6681f21363f5da683b7f04 (patch) | |
tree | b0cc68f0bee5188b9bba2b207120ea4cf787b0b8 /app/models/discussion_note.rb | |
parent | 359474a29ee925faf51322707f9c11272542cfd7 (diff) | |
download | gitlab-ce-93d0bacfe5eca0099a6681f21363f5da683b7f04.tar.gz |
Remove EE-specific code from DiscussionNoteremove-ee-specific-code-from-plan-and-create-models
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 89d86aaed66..142cbdcdfa6 100644 --- a/app/models/discussion_note.rb +++ b/app/models/discussion_note.rb @@ -5,9 +5,11 @@ # 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 + def self.noteable_types + %w(MergeRequest Issue Commit Snippet) + end - validates :noteable_type, inclusion: { in: NOTEABLE_TYPES } + validates :noteable_type, inclusion: { in: noteable_types } def discussion_class(*) Discussion |