fix issue notification properly
This commit is contained in:
parent
43c1039957
commit
11b70c97e3
1 changed files with 2 additions and 4 deletions
|
@ -41,10 +41,8 @@ class IssuesController < ApplicationController
|
|||
def create
|
||||
@issue = @project.issues.new(params[:issue])
|
||||
@issue.author = current_user
|
||||
if @issue.save
|
||||
@project.users.reject { |u| u.id == current_user.id } .each do |u|
|
||||
Notify.new_issue_email(@issue).deliver
|
||||
end
|
||||
if @issue.save && @issue.assignee != current_user
|
||||
Notify.new_issue_email(@issue).deliver
|
||||
end
|
||||
|
||||
respond_with(@issue)
|
||||
|
|
Loading…
Reference in a new issue