From e27cd0c31676675858fd4cd6f455ce99486e2a33 Mon Sep 17 00:00:00 2001 From: Vladimir Krylov Date: Tue, 12 Jan 2016 17:11:31 +0200 Subject: [PATCH] Story#111396470 - better code --- app/models/contact.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/models/contact.rb b/app/models/contact.rb index 75f03de09..99a41a6a4 100644 --- a/app/models/contact.rb +++ b/app/models/contact.rb @@ -29,7 +29,7 @@ class Contact < ActiveRecord::Base uniqueness: { message: :epp_id_taken }, format: { with: /\A[\w\-\:\.\_]*\z/i, message: :invalid }, length: { maximum: 100, message: :too_long_contact_code } - validate :ident_valid_format? + validate :val_ident_valid_format? validate :uniq_statuses? validate :validate_html @@ -235,7 +235,7 @@ class Contact < ActiveRecord::Base name || '[no name]' end - def ident_valid_format? + def val_ident_valid_format? case ident_country_code when 'EE'.freeze err_msg = "invalid_EE_identity_format#{"_update" if id}".to_sym