mirror of
https://github.com/internetee/registry.git
synced 2025-07-20 17:55:55 +02:00
story#115762063 - revert how children ids are saved
This commit is contained in:
parent
d5da0f8881
commit
e4cdd23248
1 changed files with 6 additions and 7 deletions
|
@ -729,13 +729,12 @@ class Domain < ActiveRecord::Base
|
|||
# small optimization that we'are using to_a if it was done already
|
||||
# otherwise just getting ids
|
||||
def children_log
|
||||
log = HashWithIndifferentAccess.new
|
||||
types = %i(admin_contacts tech_contacts nameservers dnskeys domain_statuses)
|
||||
|
||||
types.each do |rel|
|
||||
ids = send(rel).loaded? ? send(rel).reject(&:marked_for_destruction?).map(&:id) : send(rel).pluck(:id)
|
||||
log[rel] = ids
|
||||
end
|
||||
log = HashWithIndifferentAccess.new
|
||||
log[:admin_contacts] = admin_contact_ids
|
||||
log[:tech_contacts] = tech_contact_ids
|
||||
log[:nameservers] = nameserver_ids
|
||||
log[:domain_statuses]= domain_status_ids
|
||||
log[:dnskeys] = dnskey_ids
|
||||
log[:registrant] = [registrant_id]
|
||||
log
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue