From 6381c28e48952913ba1afb4058bd2daf0b167ad3 Mon Sep 17 00:00:00 2001 From: Alexander Machehin Date: Mon, 25 Feb 2013 16:13:40 +0600 Subject: [PATCH] #946 fixed undefined local variable or method 'user_name' --- .../activity_feeds/partials/_git_new_push_notification.haml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/views/activity_feeds/partials/_git_new_push_notification.haml b/app/views/activity_feeds/partials/_git_new_push_notification.haml index 84816d827..124d3291a 100644 --- a/app/views/activity_feeds/partials/_git_new_push_notification.haml +++ b/app/views/activity_feeds/partials/_git_new_push_notification.haml @@ -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