Commit d81c6460 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Eager-load relations for Explore::ProjectsController

This removes remaining N+1 queries
parent 3e1227e7
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment