mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Bind typehead to contact too
This commit is contained in:
parent
13349a6bc9
commit
1c165cd1e4
7 changed files with 55 additions and 30 deletions
|
@ -1,7 +1,5 @@
|
|||
class Admin::ContactsController < ApplicationController
|
||||
def search
|
||||
c = Contact.arel_table
|
||||
query_string = "%#{params[:query]}%"
|
||||
render json: Contact.where(c[:code].matches(query_string)).pluck(:code)
|
||||
render json: Contact.search_by_query(params[:q])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue