Story#112601637 - admin contacts has filter to get only ident_country_code

This commit is contained in:
Vladimir Krylov 2016-03-17 13:59:42 +02:00
parent 2c059f9176
commit 58e383bd25
2 changed files with 8 additions and 1 deletions

View file

@ -20,6 +20,8 @@ class Admin::ContactsController < AdminController
else
contacts = Contact.includes(:registrar)
end
contacts = contacts.where("ident_country_code is null or ident_country_code=''") if params[:only_no_country_code].eql?('1')
normalize_search_parameters do
@q = contacts.search(search_params)