mirror of
https://github.com/internetee/registry.git
synced 2025-07-24 03:30:33 +02:00
Use central method for appending legaldocs to domains/contacts
This commit is contained in:
parent
7caa544c83
commit
50bf708b6a
10 changed files with 61 additions and 73 deletions
|
@ -59,15 +59,7 @@ module Actions
|
|||
end
|
||||
|
||||
def maybe_attach_legal_doc
|
||||
return unless legal_document
|
||||
|
||||
doc = LegalDocument.create(
|
||||
documentable_type: Contact,
|
||||
document_type: legal_document[:type], body: legal_document[:body]
|
||||
)
|
||||
|
||||
contact.legal_documents = [doc]
|
||||
contact.legal_document_id = doc.id
|
||||
Actions::BaseAction.attach_legal_doc_to_new(contact, legal_document, domain: false)
|
||||
end
|
||||
|
||||
def commit
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue