diff options
author | Stan Hu <stanhu@gmail.com> | 2018-03-18 15:13:17 -0700 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-03-19 08:32:57 -0700 |
commit | 48f0eff37ab74ba4409dd28c5003898e2272a010 (patch) | |
tree | d83ad0b39ed3e0a5e1c04cd7bb5d59e415bb5081 /app/finders | |
parent | ea5221aeb358ef6c349cfa09b9c6993bd7bd027d (diff) | |
download | gitlab-ce-48f0eff37ab74ba4409dd28c5003898e2272a010.tar.gz |
Remove N+1 queries in /admin/projects page
Diffstat (limited to 'app/finders')
-rw-r--r-- | app/finders/admin/projects_finder.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/finders/admin/projects_finder.rb b/app/finders/admin/projects_finder.rb index 5c507fe8d50..2c8f21c2400 100644 --- a/app/finders/admin/projects_finder.rb +++ b/app/finders/admin/projects_finder.rb @@ -16,6 +16,7 @@ class Admin::ProjectsFinder items = by_archived(items) items = by_personal(items) items = by_name(items) + items = items.includes(namespace: [:owner]) sort(items).page(params[:page]) end |