mirror of
https://github.com/internetee/registry.git
synced 2025-08-06 01:35:10 +02:00
Merge branch 'story/105664240-whois-updater' into staging
This commit is contained in:
commit
242c6b2f5c
4 changed files with 28 additions and 4 deletions
|
@ -51,10 +51,10 @@ class Registrar < ActiveRecord::Base
|
|||
|
||||
WHOIS_TRIGGERS = %w(name email phone street city state zip)
|
||||
|
||||
after_save :update_whois_records
|
||||
after_commit :update_whois_records
|
||||
def update_whois_records
|
||||
return true unless changed? && (changes.keys & WHOIS_TRIGGERS).present?
|
||||
whois_records.map(&:save) # slow currently
|
||||
RegenerateRegistrarWhoisesJob.enqueue id
|
||||
end
|
||||
|
||||
after_create :create_cash_account
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue