Use `target.class.name` instead of `target.type`
This only worked for polymorphic relations
This commit is contained in:
parent
90b2aa0110
commit
39d55e52c8
|
@ -19,7 +19,7 @@
|
|||
- else
|
||||
- notifications.each do |notification|
|
||||
.dropdown-item
|
||||
= render "notifications/type/#{notification.target.type.downcase.split('::').last}", notification: notification
|
||||
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: notification
|
||||
|
||||
%a.dropdown-item.text-center{ href: notifications_path }
|
||||
%i.fa.fa-fw.fa-chevron-right
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
- @notifications.each do |notification|
|
||||
%li.list-group-item
|
||||
.media
|
||||
= render "notifications/type/#{notification.target_type.downcase.split('::').last}", notification: notification
|
||||
= render "notifications/type/#{notification.target.class.name.downcase.split('::').last}", notification: notification
|
||||
|
||||
- unless @notifications.count.zero?
|
||||
= render 'shared/cursored_pagination_dummy', more_data_available: @more_data_available, last_id: @notifications_last_id, permitted_params: %i[type]
|
||||
|
|
Loading…
Reference in New Issue