From 16280deca69a951d3f4b2cdf52a63c3a42ca95b8 Mon Sep 17 00:00:00 2001 From: Daniela Soares Feitosa Date: Mon, 14 Feb 2011 18:45:11 -0300 Subject: [PATCH] Replacing include by join on profile_list method --- app/models/profile_list_block.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/profile_list_block.rb b/app/models/profile_list_block.rb index 8240057..52ff392 100644 --- a/app/models/profile_list_block.rb +++ b/app/models/profile_list_block.rb @@ -13,7 +13,7 @@ class ProfileListBlock < Block end def profile_list - profiles.visible.all(:include => :image, :limit => limit, :select => 'DISTINCT profiles.*, ' + image_prioritizer + randomizer, :order => image_prioritizer + randomizer) + profiles.visible.all(:limit => limit, :select => 'DISTINCT profiles.*, ' + image_prioritizer + randomizer, :joins => "LEFT OUTER JOIN images ON images.owner_id = profiles.id", :order => image_prioritizer + randomizer) end def profile_count -- libgit2 0.21.2