mirror of
https://github.com/internetee/registry.git
synced 2025-05-19 10:49:39 +02:00
Story #105846070 - refactor local value to method
This commit is contained in:
parent
613a34a2c5
commit
e266c22741
1 changed files with 5 additions and 3 deletions
|
@ -3,7 +3,6 @@ class Registrant::DomainsController < RegistrantController
|
|||
def index
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
domains = current_user.domains
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q.result.page(params[:page])
|
||||
|
@ -26,7 +25,6 @@ class Registrant::DomainsController < RegistrantController
|
|||
def download_list
|
||||
authorize! :view, :registrant_domains
|
||||
params[:q] ||= {}
|
||||
domains = current_user.domains
|
||||
normalize_search_parameters do
|
||||
@q = domains.search(params[:q])
|
||||
@domains = @q
|
||||
|
@ -39,7 +37,11 @@ class Registrant::DomainsController < RegistrantController
|
|||
send_data pdf, filename: 'domains.pdf'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def domains
|
||||
current_user.domains
|
||||
end
|
||||
|
||||
def normalize_search_parameters
|
||||
ca_cache = params[:q][:valid_to_lteq]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue