diff --git a/app/views/navigation/main/_notifications.haml b/app/views/navigation/main/_notifications.haml index 2763591c..41a18b79 100644 --- a/app/views/navigation/main/_notifications.haml +++ b/app/views/navigation/main/_notifications.haml @@ -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 diff --git a/app/views/notifications/index.haml b/app/views/notifications/index.haml index 41a92858..75871f42 100644 --- a/app/views/notifications/index.haml +++ b/app/views/notifications/index.haml @@ -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]