From 736783abd7e54398705bd5416ecd943558f66f47 Mon Sep 17 00:00:00 2001 From: Raphael Sofaer Date: Thu, 24 Feb 2011 11:13:25 -0800 Subject: [PATCH] You can't call post.person when post is nil. We should probably just reject and delete the invalid notifications in the controller, keeping them in the view is aggravating --- app/helpers/notifications_helper.rb | 2 +- config/locales/diaspora/en.yml | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/helpers/notifications_helper.rb b/app/helpers/notifications_helper.rb index 18fdf3bc7..c48b32af4 100644 --- a/app/helpers/notifications_helper.rb +++ b/app/helpers/notifications_helper.rb @@ -25,7 +25,7 @@ module NotificationsHelper if post "#{translation(target_type, post.person.name)} #{link_to t('notifications.post'), object_path(post)}".html_safe else - "#{translation(target_type, post.person.name)} #{t('notifications.deleted')} #{t('notifications.post')}" + t('notifications.also_commented_deleted') end else end diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 1da47f737..27225fd7d 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -227,6 +227,7 @@ en: mentioned: "has mentioned you in their" post: "post" deleted: "deleted" + also_commented_deleted: "commented on a deleted post" index: notifications: "Notifications" mark_all_as_read: "Mark All as Read"