From 4deec0cb38dfb717e1a767c6399c538780806b24 Mon Sep 17 00:00:00 2001 From: Raphael Date: Thu, 20 Jan 2011 10:28:27 -0800 Subject: [PATCH] Fix call to search in controller --- app/controllers/people_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index ea81b317c..0f0dbe5ed 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -11,12 +11,12 @@ class PeopleController < ApplicationController def index @aspect = :search - @people = Person.search(params[:q]).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC' + @people = Person.search(params[:q], current_user).paginate :page => params[:page], :per_page => 15 if @people.count == 1 redirect_to @people.first else @hashes = hashes_for_people(@people, @aspects) - @people + @people #only do it if it is an email address if params[:q].try(:match, Devise.email_regexp) webfinger(params[:q])