mirror of
https://github.com/internetee/registry.git
synced 2025-07-03 01:33:36 +02:00
nameserver change tracking
This commit is contained in:
parent
ed34483bc2
commit
6b783fd45e
8 changed files with 44 additions and 26 deletions
|
@ -12,6 +12,7 @@ class Nameserver < ActiveRecord::Base
|
|||
|
||||
# archiving
|
||||
has_paper_trail class_name: 'NameserverVersion'
|
||||
after_destroy :domain_version
|
||||
|
||||
before_validation :normalize_attributes
|
||||
|
||||
|
@ -45,6 +46,10 @@ class Nameserver < ActiveRecord::Base
|
|||
self.ipv6 = ipv6.try(:strip).try(:upcase)
|
||||
end
|
||||
|
||||
def domain_version
|
||||
domain.touch_with_version if domain.valid?
|
||||
end
|
||||
|
||||
def to_s
|
||||
hostname
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue