Changed properties to remove unecessary exectables.
[selectricity] / app / models / ranking.rb
index 4b96b54c2060e5d8053c313a8975b901635e9042..5ef0575adc1a9525a41dc6468c3406aad1132974 100644 (file)
@@ -1,9 +1,14 @@
 class Ranking < ActiveRecord::Base
   belongs_to :candidate
   belongs_to :vote
+  acts_as_list :scope => :vote, :column => :rank
 
   def <=>(other)
     self.rank <=> other.rank
   end
 
+  def to_s
+    self.rank.to_s
+  end
+
 end

Benjamin Mako Hill || Want to submit a patch?