Extend notifications to be marked as read and unread

This commit is contained in:
rgarcia
2018-02-27 14:47:52 +01:00
parent c4ad9b940c
commit 09c44ee583
22 changed files with 445 additions and 141 deletions

View File

@@ -86,7 +86,7 @@ class CommentsController < ApplicationController
notifiable = comment.reply? ? comment.parent : comment.commentable
notifiable_author_id = notifiable.try(:author_id)
if notifiable_author_id.present? && notifiable_author_id != comment.author_id
Notification.add(notifiable.author_id, notifiable)
Notification.add(notifiable.author, notifiable)
end
end