diff options
author | Stan Hu <stanhu@gmail.com> | 2019-02-26 11:30:43 -0800 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2019-02-26 12:44:28 -0800 |
commit | ebb284c0dc59e2fd5bc76921609b60034f000c53 (patch) | |
tree | a80846427413ae82868fc391ecda6edab846eb28 /app/views/admin/runners | |
parent | 3395eacb57285424b7b8d49bdf836f638af31e8c (diff) | |
download | gitlab-ce-ebb284c0dc59e2fd5bc76921609b60034f000c53.tar.gz |
Remove N+1 query for tags in /admin/runners page
As discussed in https://github.com/mbleigh/acts-as-taggable-on/issues/91,
we can avoid N+1 queries if we use `tags` instead of `tag_list`.
Seen while reviewing
https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/19740.
Diffstat (limited to 'app/views/admin/runners')
-rw-r--r-- | app/views/admin/runners/_runner.html.haml | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin/runners/_runner.html.haml b/app/views/admin/runners/_runner.html.haml index 4641986cb56..ecf2b1d60ba 100644 --- a/app/views/admin/runners/_runner.html.haml +++ b/app/views/admin/runners/_runner.html.haml @@ -49,7 +49,7 @@ .table-section.section-10.section-wrap .table-mobile-header{ role: 'rowheader' }= _('Tags') .table-mobile-content - - runner.tag_list.sort.each do |tag| + - runner.tags.map(&:name).sort.each do |tag| %span.badge.badge-primary = tag |