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
|
2015-10-08 02:58:34 +03:00
|
|
|
find(:all, from: :halfnarp_friendly).sort { |left, right| ratings[right.id] <=> ratings[left.id] }
|
2015-10-06 21:37:53 +03:00
|
|
|
end
|
2015-10-06 15:21:46 +03:00
|
|
|
end
|