Don't include `user_deleted` posts in emails.

This commit is contained in:
Robin Ward 2013-08-08 10:32:51 -04:00
parent e5da3ed41c
commit 9564a6ce09
1 changed files with 1 additions and 0 deletions

View File

@ -110,6 +110,7 @@ class UserNotifications < ActionMailer::Base
context = ""
context_posts = Post.where(topic_id: @post.topic_id)
.where("post_number < ?", @post.post_number)
.where(user_deleted: false)
.order('created_at desc')
.limit(SiteSetting.email_posts_context)