+ else
+ # if we don't have a quickvote param, it means that the person
+ # here has not been hitting this page and we can clear any
+ # candlist in the flash
+ flash.delete(:candlist) if flash.has_key?(:candlist)
+ end
+ end
+
+ def add_candidate
+ candidate_name = params[:ajax][:newcandidate]
+ if flash.has_key?(:candlist) and flash[:candlist].instance_of?(Array)
+ flash[:candlist] << candidate_name
+ else
+ flash[:candlist] = [ candidate_name ]