From 5d64611f2bb69cce56e05ec7ffb52cd5eae79f1a Mon Sep 17 00:00:00 2001 From: Raphael Sofaer <raphael@joindiaspora.com> Date: Fri, 15 Jul 2011 14:49:17 -0700 Subject: [PATCH] Include profile in contactsController index for the publisher --- app/controllers/contacts_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb index 221afa7229..aeecaae084 100644 --- a/app/controllers/contacts_controller.rb +++ b/app/controllers/contacts_controller.rb @@ -15,7 +15,7 @@ class ContactsController < ApplicationController @people = Person.joins(:contacts => :aspect_memberships). where(:contacts => {:user_id => current_user.id}, :aspect_memberships => {:aspect_id => params[:aspect_ids]}) - render :json => @people.to_json + render :json => @people.includes(:profile).to_json elsif params[:set] == "only_sharing" @contacts = current_user.contacts.only_sharing.includes(:aspects, :person => :profile).order('profiles.last_name ASC').paginate(:page => params[:page], :per_page => 25) elsif params[:set] != "all" -- GitLab