IZ MS fix 500 on commnet notificaions
This commit is contained in:
parent
68f2528f23
commit
be92f3866c
1 changed files with 2 additions and 2 deletions
|
|
@ -8,14 +8,14 @@ module NotificationsHelper
|
||||||
when 'new_request'
|
when 'new_request'
|
||||||
translation
|
translation
|
||||||
when 'comment_on_post'
|
when 'comment_on_post'
|
||||||
comment = Comment.first(:id => note.target_id)
|
comment = Comment.where(:id => note.target_id).first
|
||||||
if comment
|
if comment
|
||||||
"#{translation} #{link_to t('notifications.post'), object_path(comment.post)}".html_safe
|
"#{translation} #{link_to t('notifications.post'), object_path(comment.post)}".html_safe
|
||||||
else
|
else
|
||||||
"#{translation} #{t('notifications.deleted')} #{t('notifications.post')}"
|
"#{translation} #{t('notifications.deleted')} #{t('notifications.post')}"
|
||||||
end
|
end
|
||||||
when 'also_commented'
|
when 'also_commented'
|
||||||
comment = Comment.first(:id => note.target_id)
|
comment = Comment.where(:id => note.target_id).first
|
||||||
if comment
|
if comment
|
||||||
"#{translation} #{link_to t('notifications.post'), object_path(comment.post)}".html_safe
|
"#{translation} #{link_to t('notifications.post'), object_path(comment.post)}".html_safe
|
||||||
else
|
else
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue