From c1c0c0c21b075ee9ee2eddb75ad9681f29765bb2 Mon Sep 17 00:00:00 2001 From: Constance Okoghenun Date: Thu, 17 Jan 2019 12:15:33 +0100 Subject: Display "commented" only for commit discussions on merge requests Add commit prop to NoteableNote component and pass it from NoteableDiscussion --- app/helpers/notes_helper.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'app/helpers/notes_helper.rb') diff --git a/app/helpers/notes_helper.rb b/app/helpers/notes_helper.rb index 033686823a2..293dd20ad49 100644 --- a/app/helpers/notes_helper.rb +++ b/app/helpers/notes_helper.rb @@ -85,7 +85,7 @@ module NotesHelper diffs_project_merge_request_path(discussion.project, discussion.noteable, path_params) elsif discussion.for_commit? - anchor = discussion.line_code if discussion.diff_discussion? + anchor = discussion.diff_discussion? ? discussion.line_code : "note_#{discussion.first_note.id}" project_commit_path(discussion.project, discussion.noteable, anchor: anchor) end -- cgit v1.2.1