X-Git-Url: https://projects.mako.cc/source/selectricity-live/blobdiff_plain/1260415e640fec24f8c970ae8e61f4a7ab4594d4..45d48f668c0159ebae18fecb76b3b94f79f87d24:/app/models/ranking.rb?ds=inline diff --git a/app/models/ranking.rb b/app/models/ranking.rb index ba021a9..5ef0575 100644 --- a/app/models/ranking.rb +++ b/app/models/ranking.rb @@ -1,6 +1,7 @@ class Ranking < ActiveRecord::Base belongs_to :candidate belongs_to :vote + acts_as_list :scope => :vote, :column => :rank def <=>(other) self.rank <=> other.rank