瀏覽代碼

Use notifiable type as a scope for partial names

Chris Oliver 7 年之前
父節點
當前提交
18ed1676bf
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/views/notifications/index.html.erb

+ 1 - 1
app/views/notifications/index.html.erb

@@ -2,6 +2,6 @@
 
 <ul>
   <% @notifications.each do |notification| %>
-    <li><%= render "#{notification.action}_to_current_user", actor: notification.actor, notifiable: notification.notifiable  %></li>
+    <li><%= render "notifications/#{notification.notifiable_type.underscore}/#{notification.action.underscore}", actor: notification.actor, notifiable: notification.notifiable  %></li>
   <% end %>
 </ul>