Deliver issue mails.

It helps to actually deliver messages.
This commit is contained in:
Robb Kidd 2012-06-15 16:23:28 -04:00
parent dfb5da9da3
commit 97ca4f5dda
2 changed files with 19 additions and 7 deletions

View file

@ -2,7 +2,7 @@ class IssueObserver < ActiveRecord::Observer
cattr_accessor :current_user
def after_create(issue)
Notify.new_issue_email(issue.id) if issue.assignee != current_user
Notify.new_issue_email(issue.id).deliver if issue.assignee != current_user
end
def after_update(issue)
@ -15,7 +15,7 @@ class IssueObserver < ActiveRecord::Observer
recipient_ids = [issue.assignee_id, issue.assignee_id_was].keep_if {|id| id != current_user.id }
recipient_ids.each do |recipient_id|
Notify.reassigned_issue_email(recipient_id, issue.id, issue.assignee_id_was)
Notify.reassigned_issue_email(recipient_id, issue.id, issue.assignee_id_was).deliver
end
end
end