mirror of
https://github.com/internetee/registry.git
synced 2025-07-02 01:03:35 +02:00
Merge pull request #32 from internetee/whois-update-related-contacts
cleaner syntax
This commit is contained in:
commit
510e59c67d
1 changed files with 7 additions and 0 deletions
|
@ -61,6 +61,8 @@ class Contact < ActiveRecord::Base
|
||||||
manage_ok
|
manage_ok
|
||||||
end
|
end
|
||||||
|
|
||||||
|
after_save :update_related_whois_records
|
||||||
|
|
||||||
# for overwrite when doing children loop
|
# for overwrite when doing children loop
|
||||||
attr_writer :domains_present
|
attr_writer :domains_present
|
||||||
|
|
||||||
|
@ -468,4 +470,9 @@ class Contact < ActiveRecord::Base
|
||||||
PENDING_DELETE
|
PENDING_DELETE
|
||||||
]).present?
|
]).present?
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def update_related_whois_records
|
||||||
|
related_domain_descriptions.each{ |x, y| WhoisRecord.find_by(name: x).save}
|
||||||
|
end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue