summaryrefslogtreecommitdiff
path: root/app/helpers
diff options
context:
space:
mode:
authorRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-13 16:23:12 +0200
committerRiyad Preukschas <riyad@informatik.uni-bremen.de>2012-10-13 16:23:12 +0200
commitb1461de993daf6d43c8a54482eecacc6bb58df4d (patch)
tree56ed0f0fda021640620a824a261170c8e14aca0e /app/helpers
parentdb3d90cbcb41c5b9a62998b185c90c10f9d03968 (diff)
downloadgitlab-ce-b1461de993daf6d43c8a54482eecacc6bb58df4d.tar.gz
Make Note methods saner
Diffstat (limited to 'app/helpers')
-rw-r--r--app/helpers/notes_helper.rb4
1 files changed, 1 insertions, 3 deletions
diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb
index 99db8b6f6b7..ffcc7acc8da 100644
--- a/app/helpers/notes_helper.rb
+++ b/app/helpers/notes_helper.rb
@@ -13,9 +13,7 @@ module NotesHelper
end
def link_to_commit_diff_line_note(note)
- return unless note.line_note?
-
- commit = note.target
+ commit = note.noteable
diff_index, diff_old_line, diff_new_line = note.line_code.split('_')
link_file = commit.diffs[diff_index.to_i].new_path