end
def confirm
- @voter.vote.confirm!
-
- if @voter.election.embeddable? and params[:embed] == "true" \
- and @voter.election.early_results?
- redirect_to :action => :results, :id => @password, :embed => 'true'
- elsif not(@voter.election.verifiable) \
- and @voter.election.kiosk and params[:kiosk] == "true"
- redirect_to :action => "kiosk_ready", :id => @password, :kiosk => true
+ if @voter.vote.confirm!
+ if @voter.election.embeddable? and params[:embed] == "true" \
+ and @voter.election.early_results?
+ redirect_to :action => :results, :id => @password, :embed => 'true'
+ elsif not(@voter.election.verifiable) \
+ and @voter.election.kiosk and params[:kiosk] == "true"
+ redirect_to :action => "kiosk_ready", :id => @password, :kiosk => true
+ else
+ render :action => 'thanks'
+ end
else
- render :action => 'thanks'
+ redirect_to :action => 'index'
end
end