aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGareth Rees <gareth@mysociety.org>2014-11-20 16:04:18 +0000
committerGareth Rees <gareth@mysociety.org>2014-11-20 16:15:25 +0000
commit02f74da1378365aee177d94ecae1ebe841132ee8 (patch)
tree02b3745a67465b339fca349923a7bf3efb9b1501
parentef23327e97d99aefc8342c683c98ed0c562a0f93 (diff)
Fix incorrect count for heading children
Was initially counting the number of headings rather than the number of categories inside each heading.
-rw-r--r--app/views/admin_public_body_categories/_heading_list.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/views/admin_public_body_categories/_heading_list.html.erb b/app/views/admin_public_body_categories/_heading_list.html.erb
index f76584592..f92f0c9b0 100644
--- a/app/views/admin_public_body_categories/_heading_list.html.erb
+++ b/app/views/admin_public_body_categories/_heading_list.html.erb
@@ -4,7 +4,7 @@
<div class="accordion-heading accordion-toggle row">
<span class="item-title span6">
<a href="#heading_<%= heading.id %>_categories" data-toggle="collapse" data-parent="#categories">
- <span class="badge"><%= category_headings.size %></span>
+ <span class="badge"><%= heading.public_body_categories.size %></span>
<%= chevron_right %>
</a>
<strong><%= link_to(heading.name, edit_admin_heading_path(heading), :title => "view full details") %></strong>