summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@gitlab.com>2017-03-14 15:35:43 +0100
committerBob Van Landuyt <bob@gitlab.com>2017-03-16 12:31:27 +0100
commitc4956091e182364a3e7bafecf707a3e6d6e725e2 (patch)
tree37fc7a31f3c26467028dc8658270d8d4ddfef6dc
parenta33fbb3c83bb1663fa63ce42ced54926f050b8dc (diff)
downloadgitlab-ce-c4956091e182364a3e7bafecf707a3e6d6e725e2.tar.gz
Eager load route for project & namespace
-rw-r--r--app/controllers/dashboard/projects_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/dashboard/projects_controller.rb b/app/controllers/dashboard/projects_controller.rb
index 325ae565537..be00d765f73 100644
--- a/app/controllers/dashboard/projects_controller.rb
+++ b/app/controllers/dashboard/projects_controller.rb
@@ -42,7 +42,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
private
def load_projects(base_scope)
- projects = base_scope.sorted_by_activity.includes(:namespace)
+ projects = base_scope.sorted_by_activity.includes(:route, namespace: :route)
filter_projects(projects)
end