Improved commit author notification

This commit is contained in:
Dmitriy Zaporozhets 2012-02-10 10:59:39 +08:00
parent adcfeae161
commit a769204ff4
4 changed files with 50 additions and 16 deletions

View file

@ -27,8 +27,7 @@ class Notify < ActionMailer::Base
@user = user
@note = note
@project = note.project
@commit = @project.repo.commits(note.noteable_id).first
return unless ( note.notify or ( note.notify_author and @commit.author.email == @user.email ) )
@commit = @note.target
mail(:to => @user.email, :subject => "gitlab | note for commit | #{@note.project.name} ")
end