diff options
author | Steffen van Bergerem <svbergerem@online.de> | 2016-08-09 18:11:57 +0300 |
---|---|---|
committer | Steffen van Bergerem <svbergerem@online.de> | 2016-08-09 20:20:40 +0300 |
commit | cefffc60828f0d00b3290b7abee072acb408bf8e (patch) | |
tree | 5b2ae549ad1ff68ae871121d0c5b46518317cadd /app/controllers | |
parent | 9f28b935b9247300196d6179f453cd1c8ca7c2de (diff) |
Move contacts search to contacts#index
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/contacts_controller.rb | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/app/controllers/contacts_controller.rb b/app/controllers/contacts_controller.rb index 8e9b670f6..d3734da9b 100644 --- a/app/controllers/contacts_controller.rb +++ b/app/controllers/contacts_controller.rb @@ -13,17 +13,12 @@ class ContactsController < ApplicationController # Used by the mobile site format.mobile { set_up_contacts_mobile } - 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) + # Used for mentions in the publisher + format.json { + @people = Person.search(params[:q], current_user, only_contacts: true).limit(15) render json: @people - end + } end end |