summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-03-23 16:43:08 +0100
committerDouwe Maan <douwe@gitlab.com>2015-03-23 16:43:08 +0100
commit6b92236eeb74fa9854165c498a80f52e25e60e18 (patch)
treed29e3f2803fa785bd3f9db287bb69152c7f49231 /app/models/note.rb
parentbc4e25189805879490555ef2782193470f4fe295 (diff)
downloadgitlab-ce-notes-count-without-system.tar.gz
Don't include system notes in issue/MR comment count.notes-count-without-system
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 27b583a869a..e86160e7cd9 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -48,6 +48,7 @@ class Note < ActiveRecord::Base
scope :inline, ->{ where("line_code IS NOT NULL") }
scope :not_inline, ->{ where(line_code: [nil, '']) }
scope :system, ->{ where(system: true) }
+ scope :user, ->{ where(system: false) }
scope :common, ->{ where(noteable_type: ["", nil]) }
scope :fresh, ->{ order(created_at: :asc, id: :asc) }
scope :inc_author_project, ->{ includes(:project, :author) }