From cef8a19c12f8d4c80d4c525d524865cf6da999a9 Mon Sep 17 00:00:00 2001 From: Stan Hu Date: Sun, 2 Apr 2017 22:50:45 -0700 Subject: Eager load to avoid N+1 queries when there are labels from multiple projects in a milestone Found by Bullet in !10263 in https://gitlab.com/gitlab-org/gitlab-ce/builds/13490762 --- app/views/shared/milestones/_tabs.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/shared/milestones/_tabs.html.haml b/app/views/shared/milestones/_tabs.html.haml index 9a4502873ef..806e9e7796e 100644 --- a/app/views/shared/milestones/_tabs.html.haml +++ b/app/views/shared/milestones/_tabs.html.haml @@ -40,4 +40,4 @@ .tab-pane#tab-participants = render 'shared/milestones/participants_tab', users: milestone.participants .tab-pane#tab-labels - = render 'shared/milestones/labels_tab', labels: milestone.labels + = render 'shared/milestones/labels_tab', labels: milestone.labels.includes(:project) -- cgit v1.2.1