mirror of
https://github.com/internetee/registry.git
synced 2025-08-04 00:42:04 +02:00
Change deprecated changed? methods to new in callbacks
This commit is contained in:
parent
95ad3086b0
commit
01114386b3
7 changed files with 14 additions and 9 deletions
|
@ -73,7 +73,7 @@ class Domain < ApplicationRecord
|
|||
|
||||
before_update :manage_statuses
|
||||
def manage_statuses
|
||||
return unless registrant_id_changed? # rollback has not yet happened
|
||||
return unless will_save_change_to_registrant_id? # rollback has not yet happened
|
||||
pending_update! if registrant_verification_asked?
|
||||
true
|
||||
end
|
||||
|
@ -547,7 +547,7 @@ class Domain < ApplicationRecord
|
|||
activate if nameservers.reject(&:marked_for_destruction?).size >= Setting.ns_min_count
|
||||
end
|
||||
|
||||
cancel_force_delete if force_delete_scheduled? && registrant_id_changed?
|
||||
cancel_force_delete if force_delete_scheduled? && will_save_change_to_registrant_id?
|
||||
|
||||
if statuses.empty? && valid?
|
||||
statuses << DomainStatus::OK
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue