summaryrefslogtreecommitdiff
path: root/app/mailers
diff options
context:
space:
mode:
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/emails/groups.rb11
-rw-r--r--app/mailers/emails/projects.rb11
2 files changed, 13 insertions, 9 deletions
diff --git a/app/mailers/emails/groups.rb b/app/mailers/emails/groups.rb
index f3da3990c5f..07b8f6d735a 100644
--- a/app/mailers/emails/groups.rb
+++ b/app/mailers/emails/groups.rb
@@ -14,8 +14,9 @@ module Emails
@group = @group_member.group
@token = token
@target_url = group_url(@group)
+ @current_user = @group_member.user
mail(to: @group_member.invite_email,
- subject: "Invite to join group #{@group.name}")
+ subject: "Invitation to join group #{@group.name}")
end
def group_invite_accepted_email(group_member_id)
@@ -24,21 +25,21 @@ module Emails
@group = @group_member.group
@target_url = group_url(@group)
+ @current_user = @group_member.created_by
mail(to: @group_member.created_by.notification_email,
- subject: subject("Invite accepted"))
+ subject: subject("Invitation accepted"))
end
def group_invite_declined_email(group_id, invite_email, access_level, created_by_id)
return if created_by_id.nil?
@group = Group.find(group_id)
- @created_by = User.find(created_by_id)
+ @current_user = @created_by = User.find(created_by_id)
@access_level = access_level
@invite_email = invite_email
@target_url = group_url(@group)
-
mail(to: @created_by.notification_email,
- subject: subject("Invite declined"))
+ subject: subject("Invitation declined"))
end
end
end
diff --git a/app/mailers/emails/projects.rb b/app/mailers/emails/projects.rb
index bbfb7a3e409..7baeead3fb5 100644
--- a/app/mailers/emails/projects.rb
+++ b/app/mailers/emails/projects.rb
@@ -14,8 +14,9 @@ module Emails
@project = @project_member.project
@token = token
@target_url = namespace_project_url(@project.namespace, @project)
+ @current_user = @project_member.user
mail(to: @project_member.invite_email,
- subject: "Invite to join project #{@project.name_with_namespace}")
+ subject: "Invitation to join project #{@project.name_with_namespace}")
end
def project_invite_accepted_email(project_member_id)
@@ -24,21 +25,23 @@ module Emails
@project = @project_member.project
@target_url = namespace_project_url(@project.namespace, @project)
+ @current_user = @project_member.created_by
+
mail(to: @project_member.created_by.notification_email,
- subject: subject("Invite accepted"))
+ subject: subject("Invitation accepted"))
end
def project_invite_declined_email(project_id, invite_email, access_level, created_by_id)
return if created_by_id.nil?
@project = Project.find(project_id)
- @created_by = User.find(created_by_id)
+ @current_user = @created_by = User.find(created_by_id)
@access_level = access_level
@invite_email = invite_email
@target_url = namespace_project_url(@project.namespace, @project)
mail(to: @created_by.notification_email,
- subject: subject("Invite declined"))
+ subject: subject("Invitation declined"))
end
def project_was_moved_email(project_id, user_id)