mirror of
https://github.com/internetee/registry.git
synced 2025-07-22 10:45:58 +02:00
Style tweaks
This commit is contained in:
parent
042b0e12e0
commit
c2f67ba0ff
6 changed files with 148 additions and 147 deletions
|
@ -20,9 +20,9 @@ class Address < ActiveRecord::Base
|
|||
|
||||
parsed_frame.css('postalInfo').each do |pi|
|
||||
attr = pi.attributes['type'].try(:value)
|
||||
errors << { code: 2003, msg: I18n.t('errors.messages.attr_missing', key: 'type')} and next unless attr
|
||||
if !TYPES.include?(attr)
|
||||
errors << { code: 2005, msg: I18n.t('errors.messages.invalid_type'), value: { obj: 'type', val: attr }}
|
||||
errors << { code: 2003, msg: I18n.t('errors.messages.attr_missing', key: 'type') } and next unless attr
|
||||
unless TYPES.include?(attr)
|
||||
errors << { code: 2005, msg: I18n.t('errors.messages.invalid_type'), value: { obj: 'type', val: attr } }
|
||||
next
|
||||
end
|
||||
errors << { code: 2005, msg: I18n.t('errors.messages.repeating_postal_info') } and next if used.include?(attr)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue