mirror of
https://github.com/internetee/registry.git
synced 2025-07-05 10:43:32 +02:00
Create domain works with nested attributes
This commit is contained in:
parent
037cb57e00
commit
27d19ad237
4 changed files with 124 additions and 6 deletions
|
@ -41,6 +41,7 @@ class Domain < ActiveRecord::Base
|
|||
reject_if: proc { |attrs| attrs[:public_key].blank? }
|
||||
|
||||
has_many :legal_documents, as: :documentable
|
||||
accepts_nested_attributes_for :legal_documents, reject_if: proc { |attrs| attrs[:body].blank? }
|
||||
|
||||
delegate :code, to: :owner_contact, prefix: true
|
||||
delegate :email, to: :owner_contact, prefix: true
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue