X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/83a39529b634c0344a7884d5813e3f7e1a7dbcb4..b6c33d42dd37f1fb10db479c5d6b7fb4c660beb9:/app/controllers/quickvote_controller.rb diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 066fd6b..4b3c0c9 100644 --- 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 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,