X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/83a39529b634c0344a7884d5813e3f7e1a7dbcb4..d799e41626ef94ab28a3b5517dd2ed7d1e6b1001:/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,