Adjust to Clarion API change
This commit is contained in:
parent
82cf5bb877
commit
db852bd788
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue