Commit 16280deca69a951d3f4b2cdf52a63c3a42ca95b8
1 parent
cfb2b541
Exists in
master
and in
22 other branches
Replacing include by join on profile_list method
(ActionItem1800)
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/models/profile_list_block.rb
| ... | ... | @@ -13,7 +13,7 @@ class ProfileListBlock < Block |
| 13 | 13 | end |
| 14 | 14 | |
| 15 | 15 | def profile_list |
| 16 | - profiles.visible.all(:include => :image, :limit => limit, :select => 'DISTINCT profiles.*, ' + image_prioritizer + randomizer, :order => image_prioritizer + randomizer) | |
| 16 | + 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) | |
| 17 | 17 | end |
| 18 | 18 | |
| 19 | 19 | def profile_count | ... | ... |