Refactor diff notes creation

This commit is contained in:
Riyad Preukschas 2012-11-20 17:46:55 +01:00
parent 39834ec640
commit 06ea122840
15 changed files with 323 additions and 285 deletions

View file

@ -12,11 +12,8 @@ class NotesController < ProjectResourceController
@notes = Notes::LoadContext.new(project, current_user, params).execute
if params[:target_type] == "merge_request"
@has_diff = true
@mixed_targets = true
@discussions = discussions_from_notes
elsif params[:target_type] == "commit"
@has_diff = true
end
respond_with(@notes)