New domain form

This commit is contained in:
Martin Lensment 2014-09-08 16:23:15 +03:00
parent 98cbae993d
commit 24e7beed5b
11 changed files with 66 additions and 1 deletions

View file

@ -0,0 +1,7 @@
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