mirror of
https://github.com/internetee/registry.git
synced 2025-08-03 00:12:03 +02:00
Domain History and basic whois rake
This commit is contained in:
parent
660e910208
commit
a6c936e18d
16 changed files with 254 additions and 128 deletions
|
@ -9,4 +9,21 @@ class DomainVersion < PaperTrail::Version
|
|||
def load_snapshot
|
||||
YAML.load(snapshot)
|
||||
end
|
||||
|
||||
def previous?
|
||||
return true if previous
|
||||
false
|
||||
end
|
||||
|
||||
def changed_elements
|
||||
return [] unless previous?
|
||||
@changes = []
|
||||
@previous_snap = previous.load_snapshot
|
||||
@snap = load_snapshot
|
||||
[:owner_contact, :tech_contacts, :admin_contacts, :nameservers, :domain].each do |key|
|
||||
@changes << key unless @snap[key] == @previous_snap[key]
|
||||
end
|
||||
|
||||
@changes
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue