X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/c5fda1e5174238779afd496014379d6446d1e3c1..2a72af9b37793ded87c42042bd431495d1475c39:/app/models/ranking.rb?ds=inline diff --git a/app/models/ranking.rb b/app/models/ranking.rb index 4b96b54..9a47193 100644 --- a/app/models/ranking.rb +++ b/app/models/ranking.rb @@ -1,9 +1,21 @@ +# Selectricity: Voting Machinery for the Masses +# Copyright (C) 2007, 2008 Benjamin Mako Hill +# Copyright (C) 2007 Massachusetts Institute of Technology +# +# This program is free software. Please see the COPYING file for +# details. + 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