People index now works when there is a non-friend on the page

This commit is contained in:
Raphael 2010-09-10 16:49:09 -07:00
parent 04883f914f
commit b704704334
2 changed files with 2 additions and 1 deletions

View file

@ -5,6 +5,7 @@ class PeopleController < ApplicationController
respond_to :json, :only => [:index, :show]
def index
@groups_dropdown_array = current_user.groups.collect{|x| [x.to_s, x.id]}
@people = Person.search params[:q]
respond_with @people
end

View file

@ -41,6 +41,6 @@
%td
%td
= form_for Request.new do |f|
= f.select(:group_id, @groups_array)
= f.select(:group_id, @groups_dropdown_array)
= f.hidden_field :destination_url, :value => person.email
= f.submit "add friend"