mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add contact show
This commit is contained in:
parent
1777a0e572
commit
2d2a12b7d0
12 changed files with 131 additions and 6 deletions
|
@ -1,4 +1,5 @@
|
|||
class Admin::ContactsController < ApplicationController
|
||||
before_action :set_contact, only: [:show]
|
||||
|
||||
def index
|
||||
@q = Contact.search(params[:q])
|
||||
|
@ -8,4 +9,10 @@ class Admin::ContactsController < ApplicationController
|
|||
def search
|
||||
render json: Contact.search_by_query(params[:q])
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def set_contact
|
||||
@contact = Contact.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue