From 851957010041c9bea4d95053ff1d1ac6ce5dc266 Mon Sep 17 00:00:00 2001 From: Priit Tark Date: Tue, 3 Feb 2015 16:51:20 +0200 Subject: [PATCH] Updated rubocop --- app/controllers/epp/contacts_controller.rb | 4 ++-- app/models/domain.rb | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/controllers/epp/contacts_controller.rb b/app/controllers/epp/contacts_controller.rb index 6e575b737..1a3f374c7 100644 --- a/app/controllers/epp/contacts_controller.rb +++ b/app/controllers/epp/contacts_controller.rb @@ -46,7 +46,7 @@ class Epp::ContactsController < EppController @disclosure_policy = @contact.disclosure.try(:attributes_with_flag) @owner = owner?(false) # need to reload contact eagerly - @contact = find_contact('with eager load') if @owner # for clarity, could just be true + @contact = find_contact if @owner # for clarity, could just be true render_epp_response 'epp/contacts/info' end @@ -114,7 +114,7 @@ class Epp::ContactsController < EppController ## SHARED - def find_contact(eager_load = nil) + def find_contact contact = Contact.find_by(code: @ph[:id]) unless contact epp_errors << { code: '2303', diff --git a/app/models/domain.rb b/app/models/domain.rb index 5f9373650..ee70421f0 100644 --- a/app/models/domain.rb +++ b/app/models/domain.rb @@ -301,6 +301,7 @@ class Domain < ActiveRecord::Base log end + # rubocop:disable Metrics/MethodLength def update_whois_body self.whois_body = <<-EOS This Whois Server contains information on @@ -335,6 +336,7 @@ class Domain < ActiveRecord::Base changed: EOS end + # rubocop:enabled Metrics/MethodLength def whois_server_update(name, whois_body) wd = Whois::Domain.find_or_initialize_by(name: name)