diff --git a/app/controllers/admin/domains_controller.rb b/app/controllers/admin/domains_controller.rb index 2ec59b713..3e2d78671 100644 --- a/app/controllers/admin/domains_controller.rb +++ b/app/controllers/admin/domains_controller.rb @@ -1,6 +1,5 @@ module Admin class DomainsController < BaseController - include AdminDomains before_action :set_domain, only: %i[show edit update keep] authorize_resource @@ -14,9 +13,6 @@ module Admin domains = Domain.includes(:registrar, :registrant) end - domains = return_domains_which_related_to_registrars - - normalize_search_parameters do @q = domains.search(params[:q]) @domains = @q.result.page(params[:page]) diff --git a/app/controllers/concerns/admin_domains.rb b/app/controllers/concerns/admin_domains.rb deleted file mode 100644 index 7ce692870..000000000 --- a/app/controllers/concerns/admin_domains.rb +++ /dev/null @@ -1,13 +0,0 @@ -module AdminDomains - extend ActiveSupport::Concern - - def return_domains_which_related_to_registrars - if params[:registrar_id_eq] - domains = Domain.includes(:registrar, :registrant).where( - registrar: params[:registrar_id_eq] - ) - else - domains = Domain.includes(:registrar, :registrant) - end - end -end diff --git a/app/views/admin/contacts/index.haml b/app/views/admin/contacts/index.haml index 851617d04..6121bd0fe 100644 --- a/app/views/admin/contacts/index.haml +++ b/app/views/admin/contacts/index.haml @@ -28,7 +28,7 @@ .col-md-3 .form-group = label_tag t(:country) - = select_tag '[q][country_code_eq]', options_for_select(ApplicationController.helpers.all_country_options(params[:q][:country_code_eq]), params[:q][:country_code_eq]), { multiple: false, placeholder: t(:choose), class: 'form-control js-combobox' } + = select_tag '[q][country_code_eq]', options_for_select(ApplicationController.helpers.all_country_options(params[:q][:country_code_eq]), params[:q][:country_code_eq]), { include_blank: true, placeholder: t(:choose), class: 'form-control' } .col-md-6 .form-group = label_tag t(:contact_type) @@ -37,7 +37,7 @@ .col-md-3 .form-group = f.label t(:registrar_name) - = f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control js-combobox', placeholder: t(:choose) + = f.select :registrar_id_eq, Registrar.all.map { |x| [x, x.id] }, { include_blank: true }, class: 'form-control', placeholder: t(:choose) .col-md-3 .form-group = f.label t(:created_at_from) diff --git a/app/views/admin/domains/_search_form.html.erb b/app/views/admin/domains/_search_form.html.erb index 11cca7dd6..3389112e0 100644 --- a/app/views/admin/domains/_search_form.html.erb +++ b/app/views/admin/domains/_search_form.html.erb @@ -29,7 +29,7 @@