summaryrefslogtreecommitdiff
path: root/app/controllers
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2016-08-15 12:18:27 +0000
committerYorick Peterse <yorickpeterse@gmail.com>2016-08-15 12:18:27 +0000
commit20f9b8be2fa53034aa867882cdcd4ccd2f019d29 (patch)
treeb8ae200d4e0dec6cd17568c96b48d1405baae30b /app/controllers
parent49139f00540a0c7a5d4173c7a7b31d73d3befdfd (diff)
parentf8b53ba20b74181a46985b0c7dde742239bd54f8 (diff)
downloadgitlab-ce-20f9b8be2fa53034aa867882cdcd4ccd2f019d29.tar.gz
Merge branch '20842-todos-queries-cache' into 'master'
Try to get back todo's cache or at least avoid hitting the database See merge request !5789
Diffstat (limited to 'app/controllers')
-rw-r--r--app/controllers/dashboard/todos_controller.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb
index 19a76a5b5d8..1243bb96d4d 100644
--- a/app/controllers/dashboard/todos_controller.rb
+++ b/app/controllers/dashboard/todos_controller.rb
@@ -37,8 +37,8 @@ class Dashboard::TodosController < Dashboard::ApplicationController
def todos_counts
{
- count: TodosFinder.new(current_user, state: :pending).execute.count,
- done_count: TodosFinder.new(current_user, state: :done).execute.count
+ count: current_user.todos_pending_count,
+ done_count: current_user.todos_done_count
}
end
end