Make Note methods saner

This commit is contained in:
Riyad Preukschas 2012-10-13 16:23:12 +02:00
parent db3d90cbcb
commit b1461de993
7 changed files with 39 additions and 18 deletions

View file

@ -29,7 +29,7 @@ class Notify < ActionMailer::Base
def note_commit_email(recipient_id, note_id)
@note = Note.find(note_id)
@commit = @note.target
@commit = @note.noteable
@commit = CommitDecorator.decorate(@commit)
@project = @note.project
mail(to: recipient(recipient_id), subject: subject("note for commit #{@commit.short_id}", @commit.title))