diff --git a/app/controllers/talk_preferences_controller.rb b/app/controllers/talk_preferences_controller.rb index aed5e4e..f5d831b 100644 --- a/app/controllers/talk_preferences_controller.rb +++ b/app/controllers/talk_preferences_controller.rb @@ -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 diff --git a/app/models/talk.rb b/app/models/talk.rb index 42695da..0d45cfb 100644 --- a/app/models/talk.rb +++ b/app/models/talk.rb @@ -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