ruby syntaxt upadtes #2557

This commit is contained in:
Priit Tark 2015-06-16 22:35:40 +03:00
parent 1b66e74108
commit 9c43e8e302
5 changed files with 13 additions and 15 deletions

View file

@ -318,6 +318,7 @@ class Domain < ActiveRecord::Base
pending_json[:domain] = changes_cache
end
# rubocop: disable Metrics/CyclomaticComplexity
def registrant_update_confirmable?(token)
return true if Rails.env.development?
return false unless pending_update?
@ -337,6 +338,7 @@ class Domain < ActiveRecord::Base
return false if registrant_verification_token != token
true
end
# rubocop: enable Metrics/CyclomaticComplexity
def force_deletable?
!statuses.include?(DomainStatus::FORCE_DELETE)
@ -362,7 +364,7 @@ class Domain < ActiveRecord::Base
self.epp_pending_delete = true # for epp
return true unless registrant_verification_asked?
statuses = [DomainStatus::PENDING_DELETE]
self.statuses = [DomainStatus::PENDING_DELETE]
save(validate: false) # should check if this did succeed
DomainMailer.pending_deleted(self).deliver_now