Adjust to Clarion API change

This commit is contained in:
Petko Bordjukov 2015-10-08 02:58:34 +03:00
parent 82cf5bb877
commit db852bd788
2 changed files with 2 additions and 2 deletions

View File

@ -1,6 +1,6 @@
class TalkPreferencesController < ApplicationController class TalkPreferencesController < ApplicationController
def index def index
@talks = Talk.all(params: {locale: I18n.locale}).to_a.shuffle(random: Random.new(sort_seed)) @talks = Talk.find(:all, from: :halfnarp_friendly, params: {locale: I18n.locale}).to_a.shuffle(random: Random.new(sort_seed))
end end
def show def show

View File

@ -4,6 +4,6 @@ class Talk < ActiveResource::Base
def self.ordered_by_rating def self.ordered_by_rating
ratings = Ratings.new ratings = Ratings.new
all.sort { |left, right| ratings[right.id] <=> ratings[left.id] } find(:all, from: :halfnarp_friendly).sort { |left, right| ratings[right.id] <=> ratings[left.id] }
end end
end end