X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/2facf9c3cba1ddc270c84a713cafbe6eb7280efd..4446a6555bd54ca10a925340bb65c706678ac98e:/app/controllers/quickvote_controller.rb diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index b57abaa..cd16743 100644 --- 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