Merge pull request #837 from internetee/registry-795

Registry 795
This commit is contained in:
Timo Võhmar 2018-05-23 09:18:56 +03:00 committed by GitHub
commit 97ca7198fa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 77 additions and 72 deletions

View file

@ -36,6 +36,7 @@ class WhoisRecord < ActiveRecord::Base
registrant = domain.registrant
@disclosed = []
h[:disclaimer] = disclaimer_text if disclaimer_text.present?
h[:name] = domain.name
h[:status] = domain.statuses.map { |x| status_map[x] || x }
h[:registered] = domain.registered_at.try(:to_s, :iso8601)
@ -120,4 +121,10 @@ class WhoisRecord < ActiveRecord::Base
def destroy_whois_record
Whois::Record.where(name: name).delete_all
end
private
def disclaimer_text
Setting.registry_whois_disclaimer
end
end