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
This commit is contained in:
parent
d81c646014
commit
1297a1bd7d
|
@ -174,7 +174,7 @@
|
||||||
%h4 Latest projects
|
%h4 Latest projects
|
||||||
- @projects.each do |project|
|
- @projects.each do |project|
|
||||||
%p
|
%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
|
%span.light.float-right
|
||||||
#{time_ago_with_tooltip(project.created_at)}
|
#{time_ago_with_tooltip(project.created_at)}
|
||||||
.col-md-4
|
.col-md-4
|
||||||
|
|
Loading…
Reference in New Issue