mirror of
https://github.com/internetee/registry.git
synced 2025-05-17 01:47:18 +02:00
Reformat code
This commit is contained in:
parent
294ff638b1
commit
7fe3e2765a
2 changed files with 12 additions and 15 deletions
|
@ -1,13 +1,12 @@
|
||||||
class Registrant::DomainsController < RegistrantController
|
class Registrant::DomainsController < RegistrantController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
authorize! :view, :registrant_domains
|
authorize! :view, :registrant_domains
|
||||||
params[:q] ||= {}
|
params[:q] ||= {}
|
||||||
normalize_search_parameters do
|
normalize_search_parameters do
|
||||||
@q = domains.search(params[:q])
|
@q = domains.search(params[:q])
|
||||||
@domains = @q.result.page(params[:page])
|
@domains = @q.result.page(params[:page])
|
||||||
end
|
end
|
||||||
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
|
||||||
end
|
end
|
||||||
|
|
||||||
def show
|
def show
|
||||||
|
@ -23,11 +22,11 @@ class Registrant::DomainsController < RegistrantController
|
||||||
authorize! :view, :registrant_domains
|
authorize! :view, :registrant_domains
|
||||||
dom = domains.find(params[:id])
|
dom = domains.find(params[:id])
|
||||||
if (dom.statuses.include?(DomainStatus::PENDING_UPDATE) || dom.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)) &&
|
if (dom.statuses.include?(DomainStatus::PENDING_UPDATE) || dom.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)) &&
|
||||||
dom.pending_json.present?
|
dom.pending_json.present?
|
||||||
|
|
||||||
@domain = dom
|
@domain = dom
|
||||||
confirm_path = get_confirm_path(dom.statuses)
|
confirm_path = get_confirm_path(dom.statuses)
|
||||||
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
|
||||||
|
|
||||||
else
|
else
|
||||||
flash[:warning] = I18n.t('available_verification_url_not_found')
|
flash[:warning] = I18n.t('available_verification_url_not_found')
|
||||||
|
@ -82,5 +81,4 @@ class Registrant::DomainsController < RegistrantController
|
||||||
"#{ENV['registrant_url']}/registrant/domain_delete_confirms"
|
"#{ENV['registrant_url']}/registrant/domain_delete_confirms"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
|
||||||
|
|
|
@ -107,7 +107,6 @@ Rails.application.routes.draw do
|
||||||
member do
|
member do
|
||||||
get 'domain_verification_url'
|
get 'domain_verification_url'
|
||||||
end
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
# resources :invoices do
|
# resources :invoices do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue