base implementation

This commit is contained in:
Dmitriy Zaporozhets 2013-01-22 19:05:01 +02:00
parent e0fb0703c4
commit 70690e1971
6 changed files with 59 additions and 5 deletions

View file

@ -1,10 +1,9 @@
module EventsHelper
def link_to_author(event)
project = event.project
tm = project.team_member_by_id(event.author_id) if project
author = event.author
if tm
link_to event.author_name, project_team_member_path(project, tm)
if author
link_to author.name, user_path(author.username)
else
event.author_name
end