]> projects.mako.cc - selectricity/blob - app/models/ranking.rb
Merge into jdong
[selectricity] / app / models / ranking.rb
1 class Ranking < ActiveRecord::Base
2   belongs_to :candidate
3   belongs_to :vote
4   acts_as_list :scope => :vote, :column => :rank
5
6   def <=>(other)
7     self.rank <=> other.rank
8   end
9
10   def to_s
11     self.rank.to_s
12   end
13
14 end

Benjamin Mako Hill || Want to submit a patch?