From 2fbf2ddd6f42e5c7e92b66429f42dd5f63dcfff0 Mon Sep 17 00:00:00 2001 From: maxwell Date: Thu, 2 Dec 2010 16:09:17 -0800 Subject: [PATCH] you dont have a pending request from everyone --- app/controllers/people_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 0e28c3fb8..558c065bf 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -12,7 +12,7 @@ class PeopleController < ApplicationController @aspect = :search @people = Person.search(params[:q]).paginate :page => params[:page], :per_page => 25, :order => 'created_at DESC' - @requests = Request.all(:to_id.in => @people.map{|p| p.id}) + @requests = Request.all(:to_id.in => @people.map{|p| p.id}, :from_id => current_user.person.id) #only do it if it is an email address if params[:q].try(:match, Devise.email_regexp)