summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-11-19 08:27:35 +0000
commit7e9c479f7de77702622631cff2628a9c8dcbc627 (patch)
treec8f718a08e110ad7e1894510980d2155a6549197 /app/models/note.rb
parente852b0ae16db4052c1c567d9efa4facc81146e88 (diff)
downloadgitlab-ce-7e9c479f7de77702622631cff2628a9c8dcbc627.tar.gz
Add latest changes from gitlab-org/gitlab@13-6-stable-eev13.6.0-rc42
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index 954843505d4..cfdac6c432f 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -197,8 +197,8 @@ class Note < ApplicationRecord
.map(&:position)
end
- def count_for_collection(ids, type)
- user.select('noteable_id', 'COUNT(*) as count')
+ def count_for_collection(ids, type, count_column = 'COUNT(*) as count')
+ user.select(:noteable_id, count_column)
.group(:noteable_id)
.where(noteable_type: type, noteable_id: ids)
end