def confirm
if authenticate
- @voter.vote.confirm!
-
- if @voter.election.embeddable? and params[:embed] == "true" \
- and @voter.election.early_results?
- redirect_to :action => :results, :id => @password, :embed => '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'
+ else
+ render :action => 'thanks'
+ end
else
- render :action => 'thanks'
+ redirect_to :action => 'index'
end
else
- redirect_to :action => 'index'
+ redirect_to :action => 'index'
end
end
end
def results
- debugger
if authenticate and
(@voter.election.early_results? \
or @voter.election.enddate < Time.now)