From 76d5c96612d17ab829fa74cea8375c51bb069357 Mon Sep 17 00:00:00 2001 From: Stas Date: Thu, 21 Apr 2016 16:19:47 +0300 Subject: [PATCH] 108869472-deleted_old_code --- app/controllers/admin/domain_versions_controller.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/app/controllers/admin/domain_versions_controller.rb b/app/controllers/admin/domain_versions_controller.rb index 88e681b8b..cbc3205a3 100644 --- a/app/controllers/admin/domain_versions_controller.rb +++ b/app/controllers/admin/domain_versions_controller.rb @@ -8,14 +8,12 @@ class Admin::DomainVersionsController < AdminController @versions = @q.result.page(params[:page]) search_params = params[:q].deep_dup - if search_params[:registrant] - #registrants = Contact.find_by(name: search_params[:registrant].strip) + if search_params[:registrant].present? registrants = Contact.where("name like ?", "%#{search_params[:registrant].strip}%") search_params.delete(:registrant) end - if search_params[:registrar] - #registrar = Registrar.find_by(name: search_params[:registrar].strip) + if search_params[:registrar].present? registrars = Registrar.where("name like ?", "%#{search_params[:registrar].strip}%") search_params.delete(:registrar) end