From db852bd788c35c912461b006cefcaace00fae484 Mon Sep 17 00:00:00 2001 From: Petko Bordjukov Date: Thu, 8 Oct 2015 02:58:34 +0300 Subject: [PATCH] Adjust to Clarion API change --- app/controllers/talk_preferences_controller.rb | 2 +- app/models/talk.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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