summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorcnam-dep <cnam812@gmail.com>2016-02-24 00:59:32 +0300
committerRémy Coutable <remy@rymai.me>2016-05-09 16:07:35 +0200
commit5364400741b7d041c945ccca98283bc465d5a87c (patch)
treebae5a056d7f13d1422dc0ee2c511111b5b0c6d08 /app
parent618033fb2f0461275f03541f428e33b3e1b4d721 (diff)
downloadgitlab-ce-5364400741b7d041c945ccca98283bc465d5a87c.tar.gz
API: Expose Issue#user_notes_count
Diffstat (limited to 'app')
-rw-r--r--app/models/concerns/issuable.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/concerns/issuable.rb b/app/models/concerns/issuable.rb
index 2e4efc4e8d8..7a3db742030 100644
--- a/app/models/concerns/issuable.rb
+++ b/app/models/concerns/issuable.rb
@@ -160,6 +160,10 @@ module Issuable
notes.awards.where(note: "thumbsup").count
end
+ def user_notes_count
+ notes.user.count
+ end
+
def subscribed_without_subscriptions?(user)
participants(user).include?(user)
end