Merge pull request #964 from warpc/946-wrong_links

[refs #946] Fixed undefined local variable or method 'user_name'
This commit is contained in:
Vladimir Sharshov 2013-02-25 02:48:02 -08:00
commit d53506b092
1 changed files with 2 additions and 1 deletions

View File

@ -3,7 +3,8 @@
.image= link_to(image_tag(avatar_url(user, :small), :alt => 'avatar'), user_path(user)) if user.persisted?
.text
%span
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => user_link(user, user_name)})
-_user_link = user_link(user, defined?(user_name) ? user_name : user_email)
= raw t("notifications.bodies.#{change_type}_branch", {:branch_name => branch_name, :user_link => _user_link})
= raw t("notifications.bodies.project", :project_link => link_to("#{project_owner}/#{project_name}", project_path(project_owner, project_name)) )
.both
%span.date= activity_feed.created_at