FIX: show category in subject not checking for category

This commit is contained in:
Sam 2015-06-01 15:43:16 +10:00
parent c1a18f91ef
commit 739a6ff721

View File

@ -241,7 +241,7 @@ class UserNotifications < ActionMailer::Base
# category name # category name
category = Topic.find_by(id: post.topic_id).category category = Topic.find_by(id: post.topic_id).category
if opts[:show_category_in_subject] && post.topic_id && !category.uncategorized? if opts[:show_category_in_subject] && post.topic_id && category && !category.uncategorized?
show_category_in_subject = category.name show_category_in_subject = category.name
# subcategory case # subcategory case