projects
/
selectricity
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bbd8770
)
Throw an ArgumentError if invalid election name is passed to casting
author
John Dong
<jdong@mit.edu>
Fri, 17 Aug 2007 00:21:43 +0000
(20:21 -0400)
committer
John Dong
<jdong@mit.edu>
Fri, 17 Aug 2007 00:21:43 +0000
(20:21 -0400)
app/models/selectricity_service.rb
patch
|
blob
|
history
diff --git
a/app/models/selectricity_service.rb
b/app/models/selectricity_service.rb
index 4075f6401fa40f889f16be53ac80fc7b17398d57..7da46e18abf7183abd8ef9498341771372cb08d4 100644
(file)
--- a/
app/models/selectricity_service.rb
+++ b/
app/models/selectricity_service.rb
@@
-21,6
+21,8
@@
class SelectricityService < ActionWebService::Base
voter.save!
voter.vote.confirm!
voter.save!
+ else
+ raise ArgumentError.new "Cannot find election #{election_name}"
end
end
def quickvote_candidate_ids_to_names(shortname, id_list)
Benjamin Mako Hill
||
Want to submit a patch?