diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-11 18:39:50 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-12 18:21:36 +0200 |
commit | f8b53ba20b74181a46985b0c7dde742239bd54f8 (patch) | |
tree | ad80cfd4263526d06cc229dfdbeac174c18ffaac /app/helpers/todos_helper.rb | |
parent | 1f2253545ba7a902212bace29f144a2246eeedab (diff) | |
download | gitlab-ce-f8b53ba20b74181a46985b0c7dde742239bd54f8.tar.gz |
Recover usage of Todos counter cache20842-todos-queries-cache
We’re being kept up to date the counter data but we’re not using it.
The only thing which is not real if is the number of projects that the
user read changes the number of todos can be stale for some time.
The counters will be sync just after the user receives a new todo or mark any as done
Diffstat (limited to 'app/helpers/todos_helper.rb')
-rw-r--r-- | app/helpers/todos_helper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index e3a208f826a..0465327060e 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -1,10 +1,10 @@ module TodosHelper def todos_pending_count - @todos_pending_count ||= TodosFinder.new(current_user, state: :pending).execute.count + @todos_pending_count ||= current_user.todos_pending_count end def todos_done_count - @todos_done_count ||= TodosFinder.new(current_user, state: :done).execute.count + @todos_done_count ||= current_user.todos_done_count end def todo_action_name(todo) |