Merge pull request #2794 from consul/fix_notifiable_delegation

Try if notifiable has notifiable methods
This commit is contained in:
Alberto
2018-07-26 11:33:23 +02:00
committed by GitHub
2 changed files with 9 additions and 1 deletions

View File

@@ -1,5 +1,5 @@
<li id="<%= dom_id(notification) %>" class="notification <%= 'unread' if notification&.unread? %>">
<% if notification.try(:notifiable_available?) %>
<% if notification.notifiable.try(:notifiable_available?) %>
<% locals = { notification: notification,
timestamp: notification.timestamp,
title: notification.notifiable_title,