Ensure that Whois record is updated/destroyed when actions performed on Zone objects

This commit is contained in:
Karl Erik Õunapuu 2020-08-13 16:59:35 +03:00
parent 7e640a376e
commit 55de10a53d
4 changed files with 36 additions and 1 deletions

View file

@ -75,6 +75,7 @@ class UpdateWhoisRecordJob < Que::Job
def delete_zone(name)
WhoisRecord.where(name: name).destroy_all
Whois::Record.where(name: name).destroy_all
end
def remove_status_from_whois(domain_name:, domain_status:)

View file

@ -5,7 +5,7 @@ module Concerns
included do
after_save :update_whois_record, if: :subzone?
after_destroy :update_whois_record, if: :subzone?
after_destroy :update_whois_record
end
def subzone?