From 7fe3e2765a75256b46613a256df5476c3d99ca01 Mon Sep 17 00:00:00 2001 From: Artur Beljajev Date: Thu, 11 Jan 2018 15:53:13 +0200 Subject: [PATCH] Reformat code --- .../registrant/domains_controller.rb | 26 +++++++++---------- config/routes.rb | 1 - 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/app/controllers/registrant/domains_controller.rb b/app/controllers/registrant/domains_controller.rb index fbd0eff13..8aa86aff5 100644 --- a/app/controllers/registrant/domains_controller.rb +++ b/app/controllers/registrant/domains_controller.rb @@ -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 \ No newline at end of file +end diff --git a/config/routes.rb b/config/routes.rb index ffb618410..242028cbb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -107,7 +107,6 @@ Rails.application.routes.draw do member do get 'domain_verification_url' end - end # resources :invoices do