diff options
author | Valery Sizov <valery@gitlab.com> | 2017-04-19 18:17:46 +0300 |
---|---|---|
committer | Valery Sizov <valery@gitlab.com> | 2017-04-20 13:28:04 +0300 |
commit | 36a8cc3eca62c28ff9001be9378f76b7d59a2f4d (patch) | |
tree | e572b7b46037171d8a7e154a43c04265d0e4c176 /app/helpers | |
parent | 59a330f4cde708986b9112883b4d4f92b76e5c08 (diff) | |
download | gitlab-ce-36a8cc3eca62c28ff9001be9378f76b7d59a2f4d.tar.gz |
Remove helpers assigned_issuables_count and cached_assigned_issuables_countuassign_on_member_removing
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/issuables_helper.rb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/app/helpers/issuables_helper.rb b/app/helpers/issuables_helper.rb index 2b2b885bf52..0b13dbf5f8d 100644 --- a/app/helpers/issuables_helper.rb +++ b/app/helpers/issuables_helper.rb @@ -165,11 +165,8 @@ module IssuablesHelper html.html_safe end - def cached_assigned_issuables_count(assignee, issuable_type, state) - cache_key = hexdigest(['assigned_issuables_count', assignee.id, issuable_type, state].join('-')) - Rails.cache.fetch(cache_key, expires_in: 2.minutes) do - assigned_issuables_count(assignee, issuable_type, state) - end + def assigned_issuables_count(issuable_type) + current_user.public_send("assigned_open_#{issuable_type}_count") end def issuable_filter_params @@ -192,11 +189,6 @@ module IssuablesHelper private - def assigned_issuables_count(assignee, issuable_type, state) - 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? cookies[:collapsed_gutter] == 'true' end |