summaryrefslogtreecommitdiff
path: root/app/models/note.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@gitlab.com>2015-04-21 15:13:40 +0200
committerDouwe Maan <douwe@gitlab.com>2015-04-24 12:29:36 +0200
commit8ed7ac9d443563a62a6aa03a2ec72b9fcb0d2df1 (patch)
treeb787add194486ac4346c2de2874b32db6d37c635 /app/models/note.rb
parent84a1590252c63c710bceaa7a394799cdc5109505 (diff)
downloadgitlab-ce-8ed7ac9d443563a62a6aa03a2ec72b9fcb0d2df1.tar.gz
Use project.commit convenience method.
Diffstat (limited to 'app/models/note.rb')
-rw-r--r--app/models/note.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/note.rb b/app/models/note.rb
index e3c571a1574..99e86ac0250 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -290,7 +290,7 @@ class Note < ActiveRecord::Base
# +mentioner+.
def noteable_project_id(noteable, mentioning_project)
if noteable.is_a?(Commit)
- if mentioning_project.repository.commit(noteable.id)
+ if mentioning_project.commit(noteable.id)
# The noteable commit belongs to the mentioner's project
mentioning_project.id
else
@@ -512,7 +512,7 @@ class Note < ActiveRecord::Base
# override to return commits, which are not active record
def noteable
if for_commit?
- project.repository.commit(commit_id)
+ project.commit(commit_id)
else
super
end