Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel Mazetto <brodock@gmail.com>2018-11-14 06:17:16 +0300
committerGabriel Mazetto <brodock@gmail.com>2018-12-10 19:35:09 +0300
commit1297a1bd7dcccaa4e233925c8467c2bbe41a4bf2 (patch)
tree1afe97fde2810df30ef72a7cb8a4bc1a932a9303
parentd81c646014a112d15b0510a58ef74a28fd55f125 (diff)
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..6756299cf43 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_project_path(project), class: 'str-truncated-60'
%span.light.float-right
#{time_ago_with_tooltip(project.created_at)}
.col-md-4