Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobb Kidd <robb@thekidds.org>2012-05-16 02:48:00 +0400
committerRobb Kidd <robb@thekidds.org>2012-05-16 06:37:33 +0400
commitbb22360d1a7548facff3b72b2f9a0e66c6a55bb7 (patch)
treeb32bea574bca56ff2b4ba8beea598376a6c26ce9 /app/mailers
parent5fe75649b3e278562b241abadb7d5a62146cff34 (diff)
Make Notify#note_merge_request_email resque friendly
Update method to take ids and then perform #finds itself during mailer queue worker kick-off.
Diffstat (limited to 'app/mailers')
-rw-r--r--app/mailers/notify.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb
index 5e8af49738b..dc6ef154aac 100644
--- a/app/mailers/notify.rb
+++ b/app/mailers/notify.rb
@@ -35,13 +35,12 @@ class Notify < ActionMailer::Base
@commit = @note.target
mail(:to => @user['email'], :subject => "gitlab | note for commit | #{@note.project.name} ")
end
-
- def note_merge_request_email(user, note)
- @user = user
- @note = Note.find(note['id'])
- @project = @note.project
+
+ def note_merge_request_email(recipient_id, note_id)
+ recipient = User.find(recipient_id)
+ @note = Note.find(note_id)
@merge_request = @note.noteable
- mail(:to => @user['email'], :subject => "gitlab | note for merge request | #{@note.project.name} ")
+ mail(:to => recipient.email, :subject => "gitlab | note for merge request | #{@note.project.name} ")
end
def note_issue_email(user, note)