Fix call to search in controller

This commit is contained in:
Raphael 2011-01-20 10:28:27 -08:00
parent 971c88da5e
commit 4deec0cb38

View file

@ -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])