From 41c00a20a97e7ee3764822249d4bedc538c515aa Mon Sep 17 00:00:00 2001 From: Robb Kidd Date: Tue, 15 May 2012 19:21:12 -0400 Subject: Make Notify#note_wall_email resque friendly Update method to take ids and then perform #finds itself during mailer queue worker kick-off. --- app/mailers/notify.rb | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'app/mailers') diff --git a/app/mailers/notify.rb b/app/mailers/notify.rb index 1fa1a2b8ebc..bb46ba04f08 100644 --- a/app/mailers/notify.rb +++ b/app/mailers/notify.rb @@ -21,11 +21,10 @@ class Notify < ActionMailer::Base mail(:to => @user.email, :subject => "gitlab | New Issue was created") end - def note_wall_email(user, note) - @user = user - @note = Note.find(note['id']) - @project = @note.project - mail(:to => @user['email'], :subject => "gitlab | #{@note.project.name} ") + def note_wall_email(recipient_id, note_id) + recipient = User.find(recipient_id) + @note = Note.find(note_id) + mail(:to => recipient.email, :subject => "gitlab | #{@note.project.name} ") end def note_commit_email(recipient_id, note_id) -- cgit v1.2.1