mirror of
https://github.com/internetee/registry.git
synced 2025-06-10 14:44:47 +02:00
Use predefined methods to determine country and ident
This commit is contained in:
parent
2f259982da
commit
89154c4fe2
1 changed files with 1 additions and 2 deletions
|
@ -55,8 +55,7 @@ class RegistrantUser < User
|
|||
end
|
||||
|
||||
def update_related_contacts
|
||||
cc, idcode = registrant_ident.split('-')
|
||||
contacts = Contact.where(ident: idcode, ident_country_code: cc)
|
||||
contacts = Contact.where(ident: ident, ident_country_code: country.alpha2)
|
||||
.where('UPPER(name) != UPPER(?)', username)
|
||||
|
||||
contacts.each { |c| c.update(name: username) }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue