Change deprecated changed? methods to new in callbacks

This commit is contained in:
Alex Sherman 2020-01-29 15:41:03 +05:00
parent 95ad3086b0
commit 01114386b3
7 changed files with 14 additions and 9 deletions

View file

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