mirror of
https://github.com/internetee/registry.git
synced 2025-07-04 18:23:35 +02:00
Merge branch 'story/115762063--show-historical-nested' into staging
# Conflicts: # app/models/domain.rb
This commit is contained in:
commit
8e15da5d1e
1 changed files with 6 additions and 7 deletions
|
@ -744,12 +744,11 @@ class Domain < ActiveRecord::Base
|
|||
# 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[: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[:legal_documents]= [legal_document_id]
|
||||
log[:registrant] = [registrant_id]
|
||||
log
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue