Skip to content

Commit

Permalink
Changing check for spoiled ballots to something that actually makes s…
Browse files Browse the repository at this point in the history
…ense
  • Loading branch information
James Cash committed Sep 19, 2009
1 parent 9a448f3 commit a11bf97
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/application_helper.rb
Expand Up @@ -14,7 +14,7 @@ def calculate_winner_preferential election
total = candidates.values.sum

# Check if the majority of votes were spoiled, in which case the election is void
spoiled = candidates.keys.select { |c| c == 0 }.size
spoiled = candidates[0]
if spoiled > total/2.0
return [:spoiled , spoiled] # How do we want to indicate this?
end
Expand Down

0 comments on commit a11bf97

Please sign in to comment.