nameserver change tracking

This commit is contained in:
Andres Keskküla 2014-10-20 11:23:05 +03:00
parent ed34483bc2
commit 6b783fd45e
8 changed files with 44 additions and 26 deletions

View file

@ -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