projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fixed up a series of things in prepration for the stress test on friday
[selectricity-live]
/
app
/
controllers
/
quickvote_controller.rb
diff --git
a/app/controllers/quickvote_controller.rb
b/app/controllers/quickvote_controller.rb
index 066fd6ba463635c12af56ea07b9e5e449d998294..4b3c0c988d75544b3b9f93945a48e8a016f3fec0 100644
(file)
--- a/
app/controllers/quickvote_controller.rb
+++ b/
app/controllers/quickvote_controller.rb
@@
-97,6
+97,13
@@
class QuickvoteController < ApplicationController
# if the person has specified an election, we show them the voting
# page. otherwise, we redirect back to main the page
if @election
# if the person has specified an election, we show them the voting
# page. otherwise, we redirect back to main the page
if @election
+
+ # if the election is over, redirect to the the results page
+ unless @election.active?
+ redirect_to quickaction_url(:ident => params[:ident],
+ :action => 'results')
+ end
+
# look to see that the voter has been created and has voted in
# this election, and has confirmed their vote
@voter = QuickVoter.find(:all,
# look to see that the voter has been created and has voted in
# this election, and has confirmed their vote
@voter = QuickVoter.find(:all,
Benjamin Mako Hill
||
Want to submit a patch?