mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 19:20:37 +02:00
Merge branch 'master' into registry-791
# Conflicts: # db/structure.sql
This commit is contained in:
commit
106592e53e
58 changed files with 991 additions and 1005 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue