projects
/
selectricity-live
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Variety of improvements and additions:
[selectricity-live]
/
app
/
models
/
candidate.rb
diff --git
a/app/models/candidate.rb
b/app/models/candidate.rb
index 44a4d63ff4660f6558d8146bf1c6801d3627e3ba..a0e492e8c1f98a6848efc5215db07de5b62f4c7a 100644
(file)
--- a/
app/models/candidate.rb
+++ b/
app/models/candidate.rb
@@
-1,3
+1,8
@@
class Candidate < ActiveRecord::Base
belongs_to :election
+
+ def <=>(other)
+ self.name <=> other.name
+ end
+
end
Benjamin Mako Hill
||
Want to submit a patch?