Fix backend merge mistakes

[ci skip]
This commit is contained in:
ZJ van de Weg 2016-05-19 15:00:50 -05:00
parent b40afae62c
commit 4d6c51e228
3 changed files with 2 additions and 4 deletions

View File

@ -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

View File

@ -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?

View File

@ -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