Skip to content

Commit

Permalink
Collapsing if statement
Browse files Browse the repository at this point in the history
  • Loading branch information
James Cash committed Sep 19, 2009
1 parent fde150d commit 6a6eb9a
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions app/helpers/application_helper.rb
Expand Up @@ -7,9 +7,7 @@ def calculate_winner_preferential election

election.ballots.each do |ballot|
ballot.votes.each do |vote|
if vote.result == 1
candidates[vote.choice_id] += 1
end
candidates[vote.choice_id] += 1 if vote.result == 1
end
end

Expand Down

0 comments on commit 6a6eb9a

Please sign in to comment.