Use typeahead on conversations

This commit is contained in:
Augier
2016-09-30 12:04:04 +02:00
committed by Benjamin Neff
parent 5269a0d3c0
commit f2fdaf1daf
27 changed files with 749 additions and 262 deletions

View File

@@ -17,7 +17,8 @@ class ContactsController < ApplicationController
# Used for mentions in the publisher and pagination on the contacts page
format.json {
@people = if params[:q].present?
Person.search(params[:q], current_user, only_contacts: true).limit(15)
mutual = params[:mutual].present? && params[:mutual]
Person.search(params[:q], current_user, only_contacts: true, mutual: mutual).limit(15)
else
set_up_contacts_json
end