Nested form for domain

This commit is contained in:
Martin Lensment 2014-09-19 17:49:02 +03:00
parent d6543f2148
commit 4fef7e94c8
8 changed files with 382 additions and 26 deletions

View file

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