summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-11-14 04:17:16 +0100
committerGabriel Mazetto <brodock@gmail.com>2018-11-23 05:39:08 +0100
commit7886ddde7ec6434a909586f60fd16ce10600c559 (patch)
tree38e2ceaceb41e4d652d6fc7ca39a66d26c582c02
parent7145243c12bf49b1bfddf73695ec1969b17d1a9e (diff)
downloadgitlab-ce-7886ddde7ec6434a909586f60fd16ce10600c559.tar.gz
Remove STI #becomes call from Dashboard index
By defining the correct route helper path instead of relying on the polymorphic route, we don't invalidate the eager-loaded relations. This change removes remaining N+1 queries
-rw-r--r--app/views/admin/dashboard/index.html.haml2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin/dashboard/index.html.haml b/app/views/admin/dashboard/index.html.haml
index 7ac79cc77f5..6f63f49d76b 100644
--- a/app/views/admin/dashboard/index.html.haml
+++ b/app/views/admin/dashboard/index.html.haml
@@ -174,7 +174,7 @@
%h4 Latest projects
- @projects.each do |project|
%p
- = link_to project.full_name, [:admin, project.namespace.becomes(Namespace), project], class: 'str-truncated-60'
+ = link_to project.full_name, admin_namespace_project_path(namespace_id: project.namespace_id, id: project), class: 'str-truncated-60'
%span.light.float-right
#{time_ago_with_tooltip(project.created_at)}
.col-md-4