Attach nameservers directly to domain

This commit is contained in:
Martin Lensment 2014-09-11 13:34:55 +03:00
parent 98c2717539
commit eb8de6479e
8 changed files with 22 additions and 36 deletions

View file

@ -14,8 +14,7 @@ class Domain < ActiveRecord::Base
where(domain_contacts: { contact_type: DomainContact::ADMIN })
end, through: :domain_contacts, source: :contact
has_many :domain_nameservers, dependent: :delete_all
has_many :nameservers, through: :domain_nameservers
has_many :nameservers, dependent: :delete_all
has_many :domain_statuses, dependent: :delete_all