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