diaspora/app/helpers/notifications_helper.rb
2010-12-15 17:31:36 -08:00

22 lines
591 B
Ruby

module NotificationsHelper
def glue_text(kind)
translation = "notifications.#{kind.underscore}_glue"
t(translation)
end
def object_link(note)
kind = note.kind.underscore
translation = t("notifications.#{kind.underscore}_link")
case kind
when 'request'
link_to translation, aspects_manage_path
when 'status_message'
link_to translation, status_message_path(note.object_id)
when 'commnent'
link_to translation, object_path(note.object_id)
when 'photo'
link_to translation, photo_path(note.object_id)
else
end
end
end