mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Add feature test on force delete #2845
This commit is contained in:
parent
aa54e3c84f
commit
394f30255f
2 changed files with 35 additions and 1 deletions
|
@ -18,7 +18,7 @@ class Admin::DomainsController < AdminController
|
|||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
if @domains.count == 1
|
||||
if @domains.count == 1 && params[:q][:name_matches].present?
|
||||
redirect_to [:admin, @domains.first] and return
|
||||
elsif @domains.count == 0 && params[:q][:name_matches] !~ /^%.+%$/
|
||||
# if we do not get any results, add wildcards to the name field and search again
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue