mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 17:59:47 +02:00
Refactor #2122
This commit is contained in:
parent
b8710b2411
commit
9aa54a897e
2 changed files with 3 additions and 3 deletions
|
@ -4,9 +4,9 @@ class Admin::DomainsController < AdminController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
if params[:q][:statuses_contains]
|
if params[:statuses_contains]
|
||||||
domains = Domain.includes(:registrar, :registrant).where(
|
domains = Domain.includes(:registrar, :registrant).where(
|
||||||
"statuses @> ?::varchar[]", "{#{params[:q][:statuses_contains].join(',')}}"
|
"statuses @> ?::varchar[]", "{#{params[:statuses_contains].join(',')}}"
|
||||||
)
|
)
|
||||||
else
|
else
|
||||||
domains = Domain.includes(:registrar, :registrant)
|
domains = Domain.includes(:registrar, :registrant)
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
.col-md-6
|
.col-md-6
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag t(:status)
|
= label_tag t(:status)
|
||||||
= select_tag 'q[statuses_contains]', options_for_select(DomainStatus::STATUSES, params[:q][:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
= select_tag :statuses_contains, options_for_select(DomainStatus::STATUSES, params[:statuses_contains]), { multiple: true, placeholder: t(:choose), class: 'form-control js-combobox' }
|
||||||
.col-md-3
|
.col-md-3
|
||||||
.form-group
|
.form-group
|
||||||
= label_tag t(:results_per_page)
|
= label_tag t(:results_per_page)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue