diff options
author | Gabriel Mazetto <brodock@gmail.com> | 2018-11-14 06:15:17 +0300 |
---|---|---|
committer | Gabriel Mazetto <brodock@gmail.com> | 2018-12-10 19:35:09 +0300 |
commit | d81c646014a112d15b0510a58ef74a28fd55f125 (patch) | |
tree | ca430e44b8ece6ef0166c20583387d221100d859 /app | |
parent | 3e1227e7f58b687bcfe192e3805626494343c667 (diff) |
Eager-load relations for Explore::ProjectsController
This removes remaining N+1 queries
Diffstat (limited to 'app')
-rw-r--r-- | app/controllers/explore/projects_controller.rb | 2 |
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 |