projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'live' of ssh://ephesus.xvm.mit.edu/org/selectricity/selectricity-live
[selectricity-live]
/
app
/
models
/
election.rb
diff --git
a/app/models/election.rb
b/app/models/election.rb
index 4ce571a468c4aa91a39fd6696e7a76161e706afd..b48c9238c0bf39a2a79f1a044d0ec723626a4395 100644
(file)
--- a/
app/models/election.rb
+++ b/
app/models/election.rb
@@
-137,11
+137,11
@@
class Election < ActiveRecord::Base
# skip if the voter has not voted or has an unconfirmed vote
next unless voter.voted?
# skip if the voter has not voted or has an unconfirmed vote
next unless voter.voted?
- plurality_tally << voter.vote.rankings.sort[0].candidate
.
id
+ plurality_tally << voter.vote.rankings.sort[0].candidate
_
id
approval_tally << voter.vote.rankings.sort[0..1].collect \
approval_tally << voter.vote.rankings.sort[0..1].collect \
- { |ranking| ranking.candidate
.
id }
+ { |ranking| ranking.candidate
_
id }
preference_tally << voter.vote.rankings.sort.collect \
preference_tally << voter.vote.rankings.sort.collect \
- { |ranking| ranking.candidate
.
id }
+ { |ranking| ranking.candidate
_
id }
end
@plurality_result = PluralityVote.new(plurality_tally).result
end
@plurality_result = PluralityVote.new(plurality_tally).result
Benjamin Mako Hill
||
Want to submit a patch?