Commit 3e1227e7 authored by Gabriel Mazetto's avatar Gabriel Mazetto

Eager-load relations for Dashboard::ProjectsController

This removes remaining N+1 queries
parent eadd53b9
......@@ -56,7 +56,7 @@ class Dashboard::ProjectsController < Dashboard::ApplicationController
projects = ProjectsFinder
.new(params: finder_params, current_user: current_user)
.execute
.includes(:route, :creator, namespace: [:route, :owner])
.includes(:route, :creator, :group, namespace: [:route, :owner])
.page(finder_params[:page])
prepare_projects_for_rendering(projects)
......
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