summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2017-03-30 18:38:21 -0600
committerLuke "Jared" Bennett <lbennett@gitlab.com>2017-04-05 17:44:14 +0100
commit2058e71e63c9ac471137f831b4d04b6626968532 (patch)
tree5c06529ab83a209f8ad7b203d1f131a97041b0bf /app/models/note.rb
parent874413cf701870a0fc1051f7c0a5fc4b4f884657 (diff)
downloadgitlab-ce-2058e71e63c9ac471137f831b4d04b6626968532.tar.gz
Extract commonalities between DiffDiscussion and LegacyDiffDiscussion
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb9
1 files changed, 1 insertions, 8 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 00a58afd2b6..eef868a05d6 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -75,6 +75,7 @@ class Note < ActiveRecord::Base
end
scope :diff_notes, ->{ where(type: %w(LegacyDiffNote DiffNote)) }
+ scope :new_diff_notes, ->{ where(type: 'DiffNote') }
scope :non_diff_notes, ->{ where(type: ['Note', 'DiscussionNote', nil]) }
scope :with_associations, -> do
@@ -136,14 +137,6 @@ class Note < ActiveRecord::Base
false
end
- def legacy_diff_note?
- false
- end
-
- def new_diff_note?
- false
- end
-
def active?
true
end