#15: update subjects for new Issues/PullRequests/Comments

This commit is contained in:
Vokhmin Alexey V 2013-03-13 16:03:53 +04:00
parent 6bb2188c2f
commit 032d045383
1 changed files with 8 additions and 3 deletions

View File

@ -16,7 +16,10 @@ class UserMailer < ActionMailer::Base
def new_comment_notification(comment, user)
@user = user
@comment = comment
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_#{comment.commit_comment? ? 'commit_' : ''}comment_notification")) do |format|
issue = @comment.commentable if @comment.issue_comment?
subject = issue ? "Re: [#{issue.project.name}] #{issue.title} (##{issue.serial_id})" :
I18n.t('notifications.subjects.new_commit_comment_notification')
mail(:to => user.email, :subject => subject) do |format|
format.html
end
end
@ -24,7 +27,8 @@ class UserMailer < ActionMailer::Base
def new_issue_notification(issue, user)
@user = user
@issue = issue
mail(:to => user.email, :subject => I18n.t("notifications.subjects.new_issue_notification")) do |format|
subject = "[#{issue.project.name}] #{issue.title} (##{issue.serial_id})"
mail(:to => user.email, :subject => subject) do |format|
format.html
end
end
@ -32,7 +36,8 @@ class UserMailer < ActionMailer::Base
def issue_assign_notification(issue, user)
@user = user
@issue = issue
mail(:to => user.email, :subject => I18n.t("notifications.subjects.issue_assign_notification")) do |format|
subject = "Re: [#{issue.project.name}] #{issue.title} (##{issue.serial_id})"
mail(:to => user.email, :subject => subject) do |format|
format.html
end
end