projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Variety of small changes (mostly to properties) plus a few "in the
[selectricity-live]
/
app
/
models
/
candidate.rb
diff --git
a/app/models/candidate.rb
b/app/models/candidate.rb
old mode 100644
(file)
new mode 100755
(executable)
index
7af978a
..
430b6ab
--- a/
app/models/candidate.rb
+++ b/
app/models/candidate.rb
@@
-1,6
+1,8
@@
class Candidate < ActiveRecord::Base
belongs_to :election
- validates_uniqueness_of :name
+ validates_presence_of :name
+
+ # validate uniqueness of a name *within a given election*
def <=>(other)
self.name <=> other.name
Benjamin Mako Hill
||
Want to submit a patch?