Adjust to Clarion API change
This commit is contained in:
parent
82cf5bb877
commit
db852bd788
|
@ -1,6 +1,6 @@
|
|||
class TalkPreferencesController < ApplicationController
|
||||
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
|
||||
|
||||
def show
|
||||
|
|
|
@ -4,6 +4,6 @@ class Talk < ActiveResource::Base
|
|||
|
||||
def self.ordered_by_rating
|
||||
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
|
||||
|
|
Loading…
Reference in New Issue