FIX: remove notifications on deleted topics from the stream

This commit is contained in:
Sam
2015-02-19 12:40:00 +11:00
parent 59a28bf5c1
commit 67f404d281
3 changed files with 18 additions and 7 deletions

View File

@ -28,6 +28,7 @@ class NotificationsController < ApplicationController
end
notifications = Notification.where(user_id: user.id)
.visible
.includes(:topic)
.limit(60)
.where('created_at < ?', params[:before])