Fixed: undefined method project for "AR:Issue:":String

This commit is contained in:
Vokhmin Alexey V 2014-06-18 22:32:17 +04:00
parent 4601de81e4
commit 32c03780ba
2 changed files with 6 additions and 6 deletions

View File

@ -31,12 +31,12 @@ class UserMailer < ActionMailer::Base
end
end
def new_issue_notification(issue, user)
@user, @issue = user, issue
def new_issue_notification(issue_id, user_id)
@user, @issue = User.find(user_id), Issue.find(issue_id)
mail(
to: email_with_name(user, user.email),
subject: subject_for_issue(issue, true),
from: email_with_name(issue.user)
to: email_with_name(@user, @user.email),
subject: subject_for_issue(@issue, true),
from: email_with_name(@issue.user)
) do |format|
format.html
end

View File

@ -17,7 +17,7 @@ module Feed::Issue
collect_recipients.each do |recipient|
next if user_id == recipient.id
if recipient.notifier.can_notify && recipient.notifier.new_issue && assignee_id != recipient.id
UserMailer.new_issue_notification(self, recipient).deliver
UserMailer.new_issue_notification(id, recipient.id).deliver
end
ActivityFeed.create(
user: recipient,