mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
7 lines
223 B
Ruby
7 lines
223 B
Ruby
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)
|
|
end
|
|
end
|