Merge branch 'master' into registry-791

# Conflicts:
#	db/structure.sql
This commit is contained in:
Artur Beljajev 2018-07-19 20:40:45 +03:00
commit 106592e53e
58 changed files with 991 additions and 1005 deletions

View file

@ -294,36 +294,6 @@ class Domain < ActiveRecord::Base
save
end
# state changes may be done low-level - no validation
# in this metod we still save PaperTrail log.
def clean_pendings_lowlevel
statuses.delete(DomainStatus::PENDING_DELETE_CONFIRMATION)
statuses.delete(DomainStatus::PENDING_UPDATE)
statuses.delete(DomainStatus::PENDING_DELETE)
status_notes[DomainStatus::PENDING_UPDATE] = ''
status_notes[DomainStatus::PENDING_DELETE] = ''
hash = {
registrant_verification_token: nil,
registrant_verification_asked_at: nil,
pending_json: {},
status_notes: status_notes,
statuses: statuses.presence || [DomainStatus::OK],
# need this column in order to update PaperTrail version properly
updated_at: Time.now.utc
}
# PaperTrail
self.attributes = hash
record_update
clear_version_instance!
reset_transaction_id
update_columns(hash)
end
def pending_update!
return true if pending_update?
self.epp_pending_update = true # for epp
@ -581,10 +551,6 @@ class Domain < ActiveRecord::Base
end
end
def send_mail(action)
DomainMailer.send(action, DomainMailModel.new(self).send(action)).deliver
end
def admin_contact_names
admin_contacts.names
end