mirror of
https://github.com/internetee/registry.git
synced 2025-07-23 11:16:00 +02:00
Rename notifications.body
to text
This commit is contained in:
parent
8765baf319
commit
dfff6f6d12
16 changed files with 30 additions and 22 deletions
|
@ -272,7 +272,7 @@ class Domain < ActiveRecord::Base
|
|||
|
||||
def notify_registrar(message_key)
|
||||
registrar.notifications.create!(
|
||||
body: "#{I18n.t(message_key)}: #{name}",
|
||||
text: "#{I18n.t(message_key)}: #{name}",
|
||||
attached_obj_id: id,
|
||||
attached_obj_type: self.class.to_s
|
||||
)
|
||||
|
|
|
@ -74,7 +74,7 @@ class DomainTransfer < ActiveRecord::Base
|
|||
old_registrant_code = domain.registrant.code
|
||||
|
||||
old_registrar.notifications.create!(
|
||||
body: I18n.t('notifications.texts.domain_transfer',
|
||||
text: I18n.t('notifications.texts.domain_transfer',
|
||||
domain_name: domain.name,
|
||||
old_contacts_codes: old_contacts_codes,
|
||||
old_registrant_code: old_registrant_code),
|
||||
|
|
|
@ -626,7 +626,7 @@ class Epp::Domain < Domain
|
|||
|
||||
if dt.pending?
|
||||
registrar.notifications.create!(
|
||||
body: I18n.t('transfer_requested'),
|
||||
text: I18n.t('transfer_requested'),
|
||||
attached_obj_id: dt.id,
|
||||
attached_obj_type: dt.class.to_s
|
||||
)
|
||||
|
@ -728,7 +728,7 @@ class Epp::Domain < Domain
|
|||
return false unless valid?
|
||||
|
||||
registrar.notifications.create!(
|
||||
body: 'Key Relay action completed successfully.',
|
||||
text: 'Key Relay action completed successfully.',
|
||||
attached_obj_type: kr.class.to_s,
|
||||
attached_obj_id: kr.id
|
||||
)
|
||||
|
|
|
@ -6,7 +6,7 @@ class Notification < ActiveRecord::Base
|
|||
|
||||
scope :queued, -> { where(queued: true) }
|
||||
|
||||
validates :body, presence: true
|
||||
validates :text, presence: true
|
||||
|
||||
def dequeue
|
||||
self.queued = false
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue