X-Git-Url: https://projects.mako.cc/source/selectricity/blobdiff_plain/192728d0e5facadf7e41ed737ca59e5c14123efd..257d5a4c8c02d7b001fbfbce4aaced9f9937ff61:/app/controllers/quickvote_controller.rb diff --git a/app/controllers/quickvote_controller.rb b/app/controllers/quickvote_controller.rb index 58370f7..5b3acab 100644 --- a/app/controllers/quickvote_controller.rb +++ b/app/controllers/quickvote_controller.rb @@ -21,7 +21,6 @@ class QuickvoteController < ApplicationController @quickvote = @quickvote.reload render :action => 'success' else - raise ArgumentError.new(@quickvote.errors.inspect) flash.keep(:candlist) end @@ -157,7 +156,11 @@ class QuickvoteController < ApplicationController ############################################################### 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}