diff options
author | Yorick Peterse <yorickpeterse@gmail.com> | 2016-08-15 12:18:27 +0000 |
---|---|---|
committer | Yorick Peterse <yorickpeterse@gmail.com> | 2016-08-15 12:18:27 +0000 |
commit | 20f9b8be2fa53034aa867882cdcd4ccd2f019d29 (patch) | |
tree | b8ae200d4e0dec6cd17568c96b48d1405baae30b /app/controllers | |
parent | 49139f00540a0c7a5d4173c7a7b31d73d3befdfd (diff) | |
parent | f8b53ba20b74181a46985b0c7dde742239bd54f8 (diff) | |
download | gitlab-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.rb | 4 |
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 |