changed comments helper to proper return unread comments available for current_user
This commit is contained in:
parent
f3fa68e371
commit
55eddbfde7
1 changed files with 2 additions and 1 deletions
|
|
@ -280,6 +280,7 @@ module ApplicationHelper
|
||||||
end
|
end
|
||||||
|
|
||||||
def unread_notifications(user)
|
def unread_notifications(user)
|
||||||
Comment.find_since_last_login(user)
|
available_conferences_ids = Conference.with_roles([:admin, :organizer, :cfp], user).pluck(:id)
|
||||||
|
Comment.find_since_last_login(user).where(commentable_type: 'Event', commentable_id: Event.where(conference_id: available_conferences_ids))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue