summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorZJ van de Weg <zegerjan@gitlab.com>2016-05-19 15:00:50 -0500
committerZJ van de Weg <zegerjan@gitlab.com>2016-05-19 15:00:50 -0500
commit4d6c51e2282c6416a8766fdf580a19fd08670609 (patch)
tree055a52e8bfa2cbda85a73d3eb2f25edcaa5ad658 /app
parentb40afae62c6df741d4b458289c3d44af5a43ca4e (diff)
downloadgitlab-ce-4d6c51e2282c6416a8766fdf580a19fd08670609.tar.gz
Fix backend merge mistakes
[ci skip]
Diffstat (limited to 'app')
-rw-r--r--app/controllers/projects/merge_requests_controller.rb2
-rw-r--r--app/models/note.rb2
-rw-r--r--app/views/projects/notes/_note.html.haml2
3 files changed, 2 insertions, 4 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 94eab37cb83..4a9ea4cbaad 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -303,7 +303,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController
# Build a note object for comment form
@note = @project.notes.new(noteable: @merge_request)
@notes = @merge_request.mr_and_commit_notes.inc_author.fresh
- @discussions = Note.discussions_from_notes(@notes)
+ @discussions = @notes.discussions
@noteable = @merge_request
# Get commits from repository
diff --git a/app/models/note.rb b/app/models/note.rb
index e9bef4fb9fe..2b1a3f90697 100644
--- a/app/models/note.rb
+++ b/app/models/note.rb
@@ -193,7 +193,7 @@ class Note < ActiveRecord::Base
end
def award_emoji_supported?
- noteable.is_a?(Awardable) && !for_diff_line?
+ noteable.is_a?(Awardable) && !line_code.present?
end
def contains_emoji_only?
diff --git a/app/views/projects/notes/_note.html.haml b/app/views/projects/notes/_note.html.haml
index 0b4a084b9ae..13d3f1eceab 100644
--- a/app/views/projects/notes/_note.html.haml
+++ b/app/views/projects/notes/_note.html.haml
@@ -38,8 +38,6 @@
= markdown(note.note, pipeline: :note, cache_key: [note, "note"])
- if note_editable
= render 'projects/notes/edit_form', note: note
- .note-awards
- = render 'emoji_awards/awards_block', awardable: note, inline: false
= edited_time_ago_with_tooltip(note, placement: 'bottom', html_class: 'note_edited_ago', include_author: true)
- if note.attachment.url