diff --git a/app/helpers/epp/contacts_helper.rb b/app/helpers/epp/contacts_helper.rb index 20982b336..0c5b6fcf4 100644 --- a/app/helpers/epp/contacts_helper.rb +++ b/app/helpers/epp/contacts_helper.rb @@ -39,7 +39,7 @@ module Epp::ContactsHelper def info_contact handle_errors(@contact) and return unless @contact handle_errors(@contact) and return unless rights? - @disclosure = ContactDisclosure.default_values.merge(@contact.disclosure.try(:as_hash) || {}) + @disclosure = ContactDisclosure.default_values.merge(@contact.disclosure.try(:as_hash) || {}) @disclosure_policy = @contact.disclosure.try(:attributes_with_flag) @owner = owner?(false) # need to reload contact eagerly @@ -111,7 +111,7 @@ module Epp::ContactsHelper ## SHARED - def find_contact(eager_load=nil) + def find_contact(eager_load = nil) if eager_load contact = Contact.includes(address: :country).find_by(code: @ph[:id]) else diff --git a/spec/models/contact_spec.rb b/spec/models/contact_spec.rb index e8e65d9a4..d06b23525 100644 --- a/spec/models/contact_spec.rb +++ b/spec/models/contact_spec.rb @@ -18,11 +18,11 @@ describe Contact do end it 'validates birthday' do - invalid = [ '123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999' ] + invalid = ['123' '12/12/2012', 'aaaa', '12/12/12', '02-11-1999'] invalid.each do |date| expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be false end - valid = [ '2012-12-11', '1990-02-16' ] + valid = ['2012-12-11', '1990-02-16'] valid.each do |date| expect(Fabricate.build(:contact, ident_type: 'birthday', ident: date).valid?).to be true end