diff options
Diffstat (limited to 'app/models/note.rb')
| -rw-r--r-- | app/models/note.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index 65b20fe0b11..ae51e486675 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -49,7 +49,7 @@ class Note < ActiveRecord::Base end def target - if noteable_type == "Commit" + if commit? project.commit(noteable_id) else noteable @@ -82,6 +82,10 @@ class Note < ActiveRecord::Base noteable_type == "Commit" end + def line_note? + line_code.present? + end + def commit_author @commit_author ||= project.users.find_by_email(target.author_email) || |
