mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 10:29:07 +01:00
Use .class.name
for target_type
in Notification#make_notification
This commit is contained in:
parent
f20e407cc3
commit
f9ec11a616
1 changed files with 1 additions and 1 deletions
|
@ -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 a new issue