diaspora/app/helpers/notifications_helper.rb
2010-12-16 18:07:43 -08:00

15 lines
349 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'
link_to translation, object_path(Comment.first(:id => object_id).post)
else
end
end
end