Commit cd10674d331305ce432b686df5848dcdef8565a0
1 parent
8086597b
Exists in
master
and in
1 other branch
ApplicationHelper.total_from_tallies: simply use Array#sum
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/helpers/application_helper.rb
@@ -78,7 +78,7 @@ module ApplicationHelper | @@ -78,7 +78,7 @@ module ApplicationHelper | ||
78 | private | 78 | private |
79 | 79 | ||
80 | def total_from_tallies(tallies) | 80 | def total_from_tallies(tallies) |
81 | - tallies.values.inject(0) {|sum, n| sum + n} | 81 | + tallies.values.sum |
82 | end | 82 | end |
83 | 83 | ||
84 | def head_size | 84 | def head_size |