X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/2facf9c3cba1ddc270c84a713cafbe6eb7280efd..7065ec58c26803b9fbc99476c09c1599996f4cc1:/app/controllers/quickvote_controller.rb?ds=sidebyside 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