X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/83a39529b634c0344a7884d5813e3f7e1a7dbcb4..bef19cbd240e996414af3e5c84fb1f8d8357340f:/app/controllers/quickvote_controller.rb?ds=inline 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,