X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/192728d0e5facadf7e41ed737ca59e5c14123efd..e9aaa095a1136966a7fcca4877882736770ac119:/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}