diff options
author | Sean McGivern <sean@gitlab.com> | 2018-10-26 16:23:58 +0300 |
---|---|---|
committer | Sean McGivern <sean@gitlab.com> | 2018-10-26 16:23:58 +0300 |
commit | 93d0bacfe5eca0099a6681f21363f5da683b7f04 (patch) | |
tree | b0cc68f0bee5188b9bba2b207120ea4cf787b0b8 /app/models/diff_note.rb | |
parent | 359474a29ee925faf51322707f9c11272542cfd7 (diff) |
Remove EE-specific code from DiscussionNote
Diffstat (limited to 'app/models/diff_note.rb')
-rw-r--r-- | app/models/diff_note.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/app/models/diff_note.rb b/app/models/diff_note.rb index 95694377fe3..5f59e4832db 100644 --- a/app/models/diff_note.rb +++ b/app/models/diff_note.rb @@ -8,12 +8,14 @@ class DiffNote < Note include DiffPositionableNote include Gitlab::Utils::StrongMemoize - NOTEABLE_TYPES = %w(MergeRequest Commit).freeze + def self.noteable_types + %w(MergeRequest Commit) + end validates :original_position, presence: true validates :position, presence: true validates :line_code, presence: true, line_code: true, if: :on_text? - validates :noteable_type, inclusion: { in: NOTEABLE_TYPES } + validates :noteable_type, inclusion: { in: noteable_types } validate :positions_complete validate :verify_supported validate :diff_refs_match_commit, if: :for_commit? |