gauge/app/models/talk.rb

10 lines
259 B
Ruby
Raw Normal View History

2015-10-06 15:21:46 +03:00
class Talk < ActiveResource::Base
self.site = "https://cfp.openfest.org/api/conferences/2"
self.element_name = "event"
2015-10-06 21:37:53 +03:00
def self.ordered_by_rating
ratings = Ratings.new
all.sort { |left, right| ratings[right.id] <=> ratings[left.id] }
end
2015-10-06 15:21:46 +03:00
end