diaspora/app/helpers/notifications_helper.rb

15 lines
397 B
Ruby

module NotificationsHelper
def object_link(note)
kind = note.kind
translation = t("notifications.#{kind}")
case kind
when 'request_accepted'
translation
when 'new_request'
translation
when 'comment_on_post'
"#{translation} #{link_to t('notifications.post'), object_path(Comment.first(:id => note.target_id).post)}".html_safe
else
end
end
end