mirror of
https://github.com/internetee/registry.git
synced 2025-05-30 17:33:57 +02:00
refactor legal document attrs
This commit is contained in:
parent
7728a90cf4
commit
e27cda1390
1 changed files with 4 additions and 8 deletions
|
@ -5,9 +5,6 @@ class Epp::Contact < Contact
|
||||||
# disable STI, there is type column present
|
# disable STI, there is type column present
|
||||||
self.inheritance_column = :sti_disabled
|
self.inheritance_column = :sti_disabled
|
||||||
|
|
||||||
# temp fix
|
|
||||||
has_many :legal_documents, as: :documentable
|
|
||||||
|
|
||||||
class << self
|
class << self
|
||||||
# rubocop: disable Metrics/PerceivedComplexity
|
# rubocop: disable Metrics/PerceivedComplexity
|
||||||
# rubocop: disable Metrics/CyclomaticComplexity
|
# rubocop: disable Metrics/CyclomaticComplexity
|
||||||
|
@ -54,11 +51,10 @@ class Epp::Contact < Contact
|
||||||
end
|
end
|
||||||
|
|
||||||
def legal_document_attrs(legal_frame)
|
def legal_document_attrs(legal_frame)
|
||||||
attrs = {}.with_indifferent_access
|
[{
|
||||||
attrs[0] = {}.with_indifferent_access
|
body: legal_frame.text,
|
||||||
attrs[0][:body] = legal_frame.text
|
document_type: legal_frame['type']
|
||||||
attrs[0][:document_type] = legal_frame['type']
|
}]
|
||||||
attrs
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue