Skip to content
Extraits de code Groupes Projets
Valider c2c6c00d rédigé par maxwell's avatar maxwell
Parcourir les fichiers

a bad fix for a 500 on notification show when the post is deleted

parent 0da4466d
Branches
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -8,7 +8,12 @@ module NotificationsHelper ...@@ -8,7 +8,12 @@ module NotificationsHelper
when 'new_request' when 'new_request'
translation translation
when 'comment_on_post' when 'comment_on_post'
"#{translation} #{link_to t('notifications.post'), object_path(Comment.first(:id => note.target_id).post)}".html_safe comment = Comment.first(:id => note.target_id)
if comment
"#{translation} #{link_to t('notifications.post'), object_path(comment.post)}".html_safe
else
"#{translation} #{t('notifications.deleted')} #{t('notifications.post')}"
end
else else
end end
end end
......
...@@ -188,6 +188,7 @@ en: ...@@ -188,6 +188,7 @@ en:
new_request: "offered to share with you." new_request: "offered to share with you."
comment_on_post: "commented on your" comment_on_post: "commented on your"
post: 'post' post: 'post'
deleted: 'deleted'
index: index:
notifications: "Notifications" notifications: "Notifications"
users: users:
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Veuillez vous inscrire ou vous pour commenter