Story#109590460 - typo

This commit is contained in:
Vladimir Krylov 2015-12-14 14:07:45 +02:00
parent 79b1125976
commit 2b4de9a5c2

View file

@ -219,7 +219,7 @@ class Contact < ActiveRecord::Base
errors.add(:ident, :invalid_EE_identity_format) unless Isikukood.new(ident).valid?
when 'org'.freeze
last_char = ident.last
if ident.size != 8 || !%(1 8 9).freeze.include?(last_char) || ident !=~/\A[12][0-9]{6}[189]\z/
if ident.size != 8 || !%w(1 8 9).freeze.include?(last_char) || ident !=~/\A[12][0-9]{6}[189]\z/
errors.add(:ident, :invalid_EE_identity_format)
end
end