diff options
author | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-16 19:23:55 +0300 |
---|---|---|
committer | Sean McGivern <sean@mcgivern.me.uk> | 2017-03-16 19:23:55 +0300 |
commit | 9f6299c47f22893fb135cab38652749cd473b62b (patch) | |
tree | 37a47a3df6e987f353b676159a0943bef0267cba /app/helpers | |
parent | 8f92de7b636d46ae9969df2aa791bfb3833ebd4a (diff) | |
parent | 398a70f3e53b2adc90460dcc1c55bae276e12ffe (diff) |
Merge branch '29534-todos-performance' into 'master'
Improve TODOs performance
See merge request !10004
Diffstat (limited to 'app/helpers')
-rw-r--r-- | app/helpers/todos_helper.rb | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/app/helpers/todos_helper.rb b/app/helpers/todos_helper.rb index 7f8efb0a4ac..4f5adf623f2 100644 --- a/app/helpers/todos_helper.rb +++ b/app/helpers/todos_helper.rb @@ -99,8 +99,7 @@ module TodosHelper end def todo_projects_options - projects = current_user.authorized_projects.sorted_by_activity.non_archived - projects = projects.includes(:namespace) + projects = current_user.authorized_projects.sorted_by_activity.non_archived.with_route projects = projects.map do |project| { id: project.id, text: project.name_with_namespace } |