mirror of
https://github.com/internetee/registry.git
synced 2025-06-11 23:24:48 +02:00
Remove dead code
This commit is contained in:
parent
c86bd96588
commit
e8232258d8
3 changed files with 0 additions and 12 deletions
|
@ -3,10 +3,6 @@ module Admin
|
|||
load_and_authorize_resource
|
||||
before_action :set_registrar, only: [:show, :edit, :update, :destroy]
|
||||
|
||||
def search
|
||||
render json: Registrar.search_by_query(params[:q])
|
||||
end
|
||||
|
||||
def index
|
||||
@q = Registrar.joins(:accounts).ordered.search(params[:q])
|
||||
@registrars = @q.result.page(params[:page])
|
||||
|
|
|
@ -44,11 +44,6 @@ class Registrar < ActiveRecord::Base
|
|||
end
|
||||
|
||||
class << self
|
||||
def search_by_query(query)
|
||||
res = search(name_or_reg_no_cont: query).result
|
||||
res.reduce([]) { |o, v| o << { id: v[:id], display_key: "#{v[:name]} (#{v[:reg_no]})" } }
|
||||
end
|
||||
|
||||
def ordered
|
||||
order(name: :asc)
|
||||
end
|
||||
|
|
|
@ -236,9 +236,6 @@ Rails.application.routes.draw do
|
|||
resources :registrars do
|
||||
resources :api_users
|
||||
resources :white_ips
|
||||
collection do
|
||||
get :search
|
||||
end
|
||||
end
|
||||
|
||||
resources :registrants, controller: 'contacts'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue