Major changes in this commit over include work over several days but that was never...
[selectricity-live] / app / models / ranking.rb
index f24f0f913dc8b33c7b0423e17701718f4c09943c..4b96b54c2060e5d8053c313a8975b901635e9042 100644 (file)
@@ -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?