Use `.class.name` for `target_type` in `Notification#make_notification`
This commit is contained in:
parent
f20e407cc3
commit
f9ec11a616
|
@ -39,7 +39,7 @@ class Notification < ApplicationRecord
|
|||
|
||||
def make_notification(recipient, target, notification_type)
|
||||
n = notification_type.new(target: target,
|
||||
target_type: target.type, # To ensure we don't get a type of 'Appenddable'
|
||||
target_type: target.class.name, # To ensure we don't get a type of 'Appenddable'
|
||||
recipient: recipient,
|
||||
new: true)
|
||||
n.save!
|
||||
|
|
Loading…
Reference in New Issue