projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Major changes in this commit over include work over several days but that was never...
[selectricity-live]
/
app
/
models
/
candidate.rb
diff --git
a/app/models/candidate.rb
b/app/models/candidate.rb
index 41d743b3a55ed07c0184605cbba600ba2ebc5c84..dfc8b1fec08fc19e87b320ea3a7c3856d1369c08 100644
(file)
--- a/
app/models/candidate.rb
+++ b/
app/models/candidate.rb
@@
-1,2
+1,12
@@
class Candidate < ActiveRecord::Base
+ belongs_to :election
+
+ def <=>(other)
+ self.name <=> other.name
+ end
+
+ def to_s
+ name
+ end
+
end
Benjamin Mako Hill
||
Want to submit a patch?