From aa759e1af8ca2cf0e5a102a457560fc90bdd4c6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 1 Jun 2019 21:02:23 +0200 Subject: [PATCH] Simplify recounts code Now the code is the same as the code in the poll booth assignment page. --- app/views/admin/poll/recounts/index.html.erb | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/app/views/admin/poll/recounts/index.html.erb b/app/views/admin/poll/recounts/index.html.erb index 151a8335d..05b415729 100644 --- a/app/views/admin/poll/recounts/index.html.erb +++ b/app/views/admin/poll/recounts/index.html.erb @@ -50,8 +50,6 @@ <% @booth_assignments.each do |booth_assignment| %> - <% total_recounts = total_recounts_by_booth(booth_assignment) %> - <% system_count = booth_assignment.voters.size %> @@ -60,21 +58,13 @@ <% unless @poll.budget_poll? %> - <% if total_recounts.present? %> - <%= total_recounts %> - <% else %> - - - <% end %> + <%= total_recounts_by_booth(booth_assignment) || "-" %> <% end %> <% unless @poll.recounts_confirmed? %> - <% if system_count.present? %> - <%= system_count %> - <% else %> - 0 - <% end %> + <%= booth_assignment.voters.size || 0 %> <% end %>