diff options
author | Paco Guzman <pacoguzmanp@gmail.com> | 2016-07-27 13:09:52 +0200 |
---|---|---|
committer | Paco Guzman <pacoguzmanp@gmail.com> | 2016-08-03 07:00:20 +0200 |
commit | 1d0c7b74920a94e488e6a2c090abb3e525438053 (patch) | |
tree | 746321bd5aa1d580f8df0337389fb92bb64ca1eb /app/controllers/projects/merge_requests_controller.rb | |
parent | 8f359ea9170b984ad43d126e17628c31ac3a1f14 (diff) | |
download | gitlab-ce-1d0c7b74920a94e488e6a2c090abb3e525438053.tar.gz |
Introduce Compare model in the codebase.
This object will manage Gitlab::Git::Compare instances
Diffstat (limited to 'app/controllers/projects/merge_requests_controller.rb')
-rw-r--r-- | app/controllers/projects/merge_requests_controller.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb index 39e7d0f6182..20afc6afcb2 100644 --- a/app/controllers/projects/merge_requests_controller.rb +++ b/app/controllers/projects/merge_requests_controller.rb @@ -86,7 +86,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController respond_to do |format| format.html { define_discussion_vars } format.json do - @diffs = @merge_request.diff_file_collection(diff_options) if @merge_request_diff.collected? + @diffs = @merge_request.diff_file_collection(diff_options) render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") } end @@ -157,10 +157,7 @@ class Projects::MergeRequestsController < Projects::ApplicationController @commit = @merge_request.diff_head_commit @base_commit = @merge_request.diff_base_commit if @merge_request.compare - @diffs = Compare.decorate(@merge_request.compare, @project).diff_file_collection( - diff_options: diff_options, - diff_refs: @merge_request.diff_refs - ) + @diffs = @merge_request.diff_file_collection(diff_options) end @diff_notes_disabled = true |