mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Added custom contact id support
This commit is contained in:
parent
aa5cc83344
commit
767f7bb6df
13 changed files with 195 additions and 42 deletions
|
@ -45,9 +45,22 @@ class Epp::Contact < Contact
|
|||
# rubocop: enable Metrics/PerceivedComplexity
|
||||
# rubocop: enable Metrics/CyclomaticComplexity
|
||||
|
||||
def new(frame)
|
||||
def new(frame, registrar)
|
||||
return super if frame.blank?
|
||||
super(attrs_from(frame))
|
||||
|
||||
custom_code =
|
||||
if frame.css('id').present?
|
||||
"#{registrar.code}:#{frame.css('id').text.parameterize}"
|
||||
else
|
||||
nil
|
||||
end
|
||||
|
||||
super(
|
||||
attrs_from(frame).merge(
|
||||
code: custom_code,
|
||||
registrar: registrar
|
||||
)
|
||||
)
|
||||
end
|
||||
|
||||
def legal_document_attrs(legal_frame)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue