Don't n-query in contacts_sharing_with

This commit is contained in:
Raphael Sofaer 2011-06-05 01:03:34 -07:00
parent 753be12a1f
commit 8a2fece0f5

View file

@ -15,7 +15,7 @@ class AspectsController < ApplicationController
@aspects = current_user.aspects.where(:id => params[:a_ids]) @aspects = current_user.aspects.where(:id => params[:a_ids])
else else
@aspects = current_user.aspects @aspects = current_user.aspects
@contacts_sharing_with = current_user.contacts.sharing @contacts_sharing_with = current_user.contacts.sharing.includes(:person => :profile)
end end
#No aspect_listings on infinite scroll #No aspect_listings on infinite scroll