mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 03:58:27 +02:00
parent
f7c2b25a66
commit
ce3b04bff0
2 changed files with 16 additions and 1 deletions
|
@ -37,6 +37,12 @@ class WhoisRecord < ActiveRecord::Base
|
|||
h = HashWithIndifferentAccess.new
|
||||
return h if domain.blank?
|
||||
|
||||
if domain.discarded?
|
||||
h[:name] = domain.name
|
||||
h[:status] = ['deleteCandidate']
|
||||
return h
|
||||
end
|
||||
|
||||
status_map = {
|
||||
'ok' => 'ok (paid and in zone)'
|
||||
}
|
||||
|
@ -102,7 +108,8 @@ class WhoisRecord < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def generated_body
|
||||
template = Rails.root.join("app/views/for_models/whois.erb".freeze)
|
||||
template_name = domain.discarded? ? 'whois_discarded.erb' : 'whois.erb'
|
||||
template = Rails.root.join("app/views/for_models/#{template_name}".freeze)
|
||||
ERB.new(template.read, nil, "-").result(binding)
|
||||
end
|
||||
# rubocop:enable Metrics/MethodLength
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue