Add contacts search

This commit is contained in:
Steffen van Bergerem
2016-08-09 15:45:27 +02:00
parent 73ce521bb3
commit f1e9c99866
8 changed files with 114 additions and 27 deletions

View File

@@ -23,6 +23,17 @@ class ContactsController < ApplicationController
end
end
def search
@people = Person.search(params[:q], current_user, only_contacts: true).limit(15)
respond_to do |format|
format.json do
@people = @people.limit(15)
render json: @people
end
end
end
def spotlight
@spotlight = true
@people = Person.community_spotlight