summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorValery Sizov <valery@gitlab.com>2017-04-18 19:02:12 +0300
committerValery Sizov <valery@gitlab.com>2017-04-18 19:02:12 +0300
commitd910a777cc53a9d087ede3079522870631baec07 (patch)
treec814074beff21f61bf60f0dfb23843de61235101
parent0c3908c38249f584b47155e80d6f434ab98b14b6 (diff)
downloadgitlab-ce-d910a777cc53a9d087ede3079522870631baec07.tar.gz
Using IssuablesFinder(s) for UI counters
-rw-r--r--app/helpers/issuables_helper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb
index ec57fec4f99..02780a4fe62 100644
--- a/app/helpers/issuables_helper.rb
+++ b/app/helpers/issuables_helper.rb
@@ -193,7 +193,8 @@ module IssuablesHelper
private
def assigned_issuables_count(assignee, issuable_type, state)
- assignee.public_send("assigned_#{issuable_type}").public_send(state).count
+ params = { assignee_id: assignee.id, state: state }
+ Object::const_get("#{issuable_type.to_s.camelize}Finder").new(current_user, params).execute.count
end
def sidebar_gutter_collapsed?