projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix weird bug with showing results from open elections
[selectricity-live]
/
app
/
controllers
/
application.rb
diff --git
a/app/controllers/application.rb
b/app/controllers/application.rb
index d8b256094b3436b1dc6e26d0c0f7aa41ae6ff321..1387b29b10dd1e53e8b7252ef258164ec9e2ebf4 100644
(file)
--- a/
app/controllers/application.rb
+++ b/
app/controllers/application.rb
@@
-47,8
+47,9
@@
class ApplicationController < ActionController::Base
#both election_controller and quickvote_controller need this method
def sort_candidates
+
@vote = Vote.find(params[:id])
-
+
@vote.rankings.each do |ranking|
ranking.rank = params['rankings-list'].index(ranking.candidate.id.to_s) + 1
ranking.save
Benjamin Mako Hill
||
Want to submit a patch?