From 739a6ff7212fe82d13208985eece892953e6ca91 Mon Sep 17 00:00:00 2001 From: Sam Date: Mon, 1 Jun 2015 15:43:16 +1000 Subject: [PATCH] FIX: show category in subject not checking for category --- app/mailers/user_notifications.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/mailers/user_notifications.rb b/app/mailers/user_notifications.rb index 6dbd95e17ee..97aa38b8364 100644 --- a/app/mailers/user_notifications.rb +++ b/app/mailers/user_notifications.rb @@ -241,7 +241,7 @@ class UserNotifications < ActionMailer::Base # category name 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 # subcategory case