projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added processing and presentatin of results.
[selectricity-live]
/
app
/
models
/
vote.rb
diff --git
a/app/models/vote.rb
b/app/models/vote.rb
index 82f34a929bb6443a7d0b5058ff1263bbb1736ab3..429e212377781d27aa4a5580d9dcb65abd5b19eb 100644
(file)
--- a/
app/models/vote.rb
+++ b/
app/models/vote.rb
@@
-36,7
+36,7
@@
class Vote < ActiveRecord::Base
destroy_rankings
self.votes.each_with_index do |candidate, index|
ranking = Ranking.new
destroy_rankings
self.votes.each_with_index do |candidate, index|
ranking = Ranking.new
- ranking.rank = index
+ 1
+ ranking.rank = index
ranking.candidate = Candidate.find(candidate)
self.rankings << ranking
end
ranking.candidate = Candidate.find(candidate)
self.rankings << ranking
end
Benjamin Mako Hill
||
Want to submit a patch?