From b7047043340019bca9c07f5ad281dd95c356b731 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 10 Sep 2010 16:49:09 -0700 Subject: [PATCH] People index now works when there is a non-friend on the page --- app/controllers/people_controller.rb | 1 + app/views/people/index.html.haml | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 8f1ea9553..044285a31 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -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 diff --git a/app/views/people/index.html.haml b/app/views/people/index.html.haml index e550ae090..2b89fb17d 100644 --- a/app/views/people/index.html.haml +++ b/app/views/people/index.html.haml @@ -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"