@quickvote = @quickvote.reload
render :action => 'success'
else
- raise ArgumentError.new(@quickvote.errors.inspect)
flash.keep(:candlist)
end
###############################################################
def results
- @election = QuickVote.ident_to_quickvote(params[:ident])
+ unless @election = QuickVote.ident_to_quickvote(params[:ident])
+ flash[:notice] = "Cannot find quickvote #{params[:ident]}."
+ redirect_to :controller => 'site'
+ return
+ end
@election.results
@candidates = {}
@election.candidates.each {|c| @candidates[c.id] = c}