fix issue notification properly

This commit is contained in:
Nihad Abbasov 2011-10-31 23:21:28 +04:00
parent 43c1039957
commit 11b70c97e3

View file

@ -41,10 +41,8 @@ class IssuesController < ApplicationController
def create def create
@issue = @project.issues.new(params[:issue]) @issue = @project.issues.new(params[:issue])
@issue.author = current_user @issue.author = current_user
if @issue.save if @issue.save && @issue.assignee != current_user
@project.users.reject { |u| u.id == current_user.id } .each do |u| Notify.new_issue_email(@issue).deliver
Notify.new_issue_email(@issue).deliver
end
end end
respond_with(@issue) respond_with(@issue)