Commit 11b70c97 authored by Nihad Abbasov's avatar Nihad Abbasov

fix issue notification properly

parent 43c10399
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment