gauge/app/models/talk.rb
2015-10-08 02:58:34 +03:00

10 lines
292 B
Ruby

class Talk < ActiveResource::Base
self.site = "https://cfp.openfest.org/api/conferences/2"
self.element_name = "event"
def self.ordered_by_rating
ratings = Ratings.new
find(:all, from: :halfnarp_friendly).sort { |left, right| ratings[right.id] <=> ratings[left.id] }
end
end