From 5f5376765001f562882ea1bbbb0710509d18989b Mon Sep 17 00:00:00 2001 From: ArtOfCode- <hello@artofcode.co.uk> Date: Mon, 1 Jun 2020 13:54:56 +0100 Subject: [PATCH] Use size for count --- app/views/categories/show.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/categories/show.html.erb b/app/views/categories/show.html.erb index 5fb77129b..f1b2b8a5d 100644 --- a/app/views/categories/show.html.erb +++ b/app/views/categories/show.html.erb @@ -8,7 +8,7 @@ </div> <% end %> -<% post_count = @posts.count %> +<% post_count = @posts.to_a.size %> <div class="has-color-tertiary-500 category-meta" title="<%= post_count %>"> <div> <%= short_number_to_human post_count, precision: 1, significant: false %> -- GitLab