Reformat code

This commit is contained in:
Artur Beljajev 2018-01-11 15:53:13 +02:00
parent 294ff638b1
commit 7fe3e2765a
2 changed files with 12 additions and 15 deletions

View file

@ -1,13 +1,12 @@
class Registrant::DomainsController < RegistrantController
def index
authorize! :view, :registrant_domains
params[:q] ||= {}
normalize_search_parameters do
@q = domains.search(params[:q])
@domains = @q.result.page(params[:page])
end
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
authorize! :view, :registrant_domains
params[:q] ||= {}
normalize_search_parameters do
@q = domains.search(params[:q])
@domains = @q.result.page(params[:page])
end
@domains = @domains.per(params[:results_per_page]) if params[:results_per_page].to_i > 0
end
def show
@ -23,11 +22,11 @@ class Registrant::DomainsController < RegistrantController
authorize! :view, :registrant_domains
dom = domains.find(params[:id])
if (dom.statuses.include?(DomainStatus::PENDING_UPDATE) || dom.statuses.include?(DomainStatus::PENDING_DELETE_CONFIRMATION)) &&
dom.pending_json.present?
dom.pending_json.present?
@domain = dom
confirm_path = get_confirm_path(dom.statuses)
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
@domain = dom
confirm_path = get_confirm_path(dom.statuses)
@verification_url = "#{confirm_path}/#{@domain.id}?token=#{@domain.registrant_verification_token}"
else
flash[:warning] = I18n.t('available_verification_url_not_found')
@ -82,5 +81,4 @@ class Registrant::DomainsController < RegistrantController
"#{ENV['registrant_url']}/registrant/domain_delete_confirms"
end
end
end
end

View file

@ -107,7 +107,6 @@ Rails.application.routes.draw do
member do
get 'domain_verification_url'
end
end
# resources :invoices do