Swap Poll White/Null/Total usage for Poll Recount

This commit is contained in:
Bertocq
2017-10-02 15:21:50 +02:00
parent 6c297ae789
commit b5cf28cb35
13 changed files with 43 additions and 85 deletions

View File

@@ -1,7 +1,7 @@
module PollRecountsHelper
def total_recounts_by_booth(booth_assignment)
booth_assignment.total_results.any? ? booth_assignment.total_results.to_a.sum(&:amount) : nil
booth_assignment.recounts.any? ? booth_assignment.recounts.to_a.sum(&:total_amount) : nil
end
end