From 24483548ec72b16ad711ac8cd92f2b430bffea5b Mon Sep 17 00:00:00 2001 From: danielgrippi Date: Fri, 1 Jul 2011 22:26:08 -0700 Subject: [PATCH] need to grab all contacts on aspect index for autocomplete --- app/controllers/aspects_controller.rb | 2 +- app/views/aspects/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 0aa61f15e..3a6c1951a 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -33,7 +33,7 @@ class AspectsController < ApplicationController all_selected_contacts = Contact.joins(:aspect_memberships). where(:aspect_memberships => {:aspect_id => aspect_ids}) @selected_contacts_count = all_selected_contacts.count - @selected_contacts = all_selected_contacts.limit(20) + @selected_contacts = all_selected_contacts end @aspect_ids = @aspects.map { |a| a.id } diff --git a/app/views/aspects/index.html.haml b/app/views/aspects/index.html.haml index 050a89788..0332bb119 100644 --- a/app/views/aspects/index.html.haml +++ b/app/views/aspects/index.html.haml @@ -23,7 +23,7 @@ :posts => @posts .span-5.rightBar.last - = render 'selected_contacts', :contacts => @selected_contacts, :count => @selected_contacts_count + = render 'selected_contacts', :contacts => @selected_contacts[0..19], :count => @selected_contacts_count .section .title