Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-11-14 06:15:17 +0300
committerGabriel Mazetto <brodock@gmail.com>2018-12-10 19:35:09 +0300
commitd81c646014a112d15b0510a58ef74a28fd55f125 (patch)
treeca430e44b8ece6ef0166c20583387d221100d859
parent3e1227e7f58b687bcfe192e3805626494343c667 (diff)
Eager-load relations for Explore::ProjectsController
This removes remaining N+1 queries
-rw-r--r--app/controllers/explore/projects_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/explore/projects_controller.rb b/app/controllers/explore/projects_controller.rb
index 7ecbc32cf4e..778fdda8dbd 100644
--- a/app/controllers/explore/projects_controller.rb
+++ b/app/controllers/explore/projects_controller.rb
@@ -57,7 +57,7 @@ class Explore::ProjectsController < Explore::ApplicationController
def load_projects
projects = ProjectsFinder.new(current_user: current_user, params: params)
.execute
- .includes(:route, namespace: :route)
+ .includes(:route, :creator, :group, namespace: [:route, :owner])
.page(params[:page])
.without_count