projects
/
selectricity
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
fix bug that allowed votes with more rankings than candidates to be recorded
[selectricity]
/
app
/
controllers
/
quickvote_controller.rb
diff --git
a/app/controllers/quickvote_controller.rb
b/app/controllers/quickvote_controller.rb
index b57abaa40dfba69ab01d3912023e183bda8af771..cd16743fcc16e2095f46b1eff115c47f2cd51d39 100644
(file)
--- a/
app/controllers/quickvote_controller.rb
+++ b/
app/controllers/quickvote_controller.rb
@@
-165,10
+165,12
@@
class QuickvoteController < ApplicationController
@voter.save
# toggle the confirmation bit
- @voter.vote.confirm!
-
- @voter.reload
- render :action => 'thanks'
+ if @voter.vote.confirm!
+ @voter.reload
+ render :action => 'thanks'
+ else
+ redirect_to :action => 'index'
+ end
end
end
Benjamin Mako Hill
||
Want to submit a patch?