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
/
ranking.rb
diff --git
a/app/models/ranking.rb
b/app/models/ranking.rb
index f24f0f913dc8b33c7b0423e17701718f4c09943c..4b96b54c2060e5d8053c313a8975b901635e9042 100644
(file)
--- a/
app/models/ranking.rb
+++ b/
app/models/ranking.rb
@@
-1,4
+1,9
@@
class Ranking < ActiveRecord::Base
belongs_to :candidate
belongs_to :vote
+
+ def <=>(other)
+ self.rank <=> other.rank
+ end
+
end
Benjamin Mako Hill
||
Want to submit a patch?