mirror of
https://github.com/internetee/registry.git
synced 2025-05-28 16:39:55 +02:00
107997032-whois_db_delete
(cherry picked from commit c4dbd4c)
This commit is contained in:
parent
a9204b8e22
commit
3ea53ad016
1 changed files with 5 additions and 0 deletions
|
@ -7,6 +7,7 @@ class WhoisRecord < ActiveRecord::Base
|
|||
|
||||
before_validation :populate
|
||||
after_save :update_whois_server
|
||||
after_destroy :destroy_whois_record
|
||||
|
||||
class << self
|
||||
def included
|
||||
|
@ -109,4 +110,8 @@ class WhoisRecord < ActiveRecord::Base
|
|||
wd.json = json
|
||||
wd.save
|
||||
end
|
||||
|
||||
def destroy_whois_record
|
||||
Whois::Record.where(name: name).delete_all()
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue