summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-08-15 17:57:19 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2016-08-15 17:57:19 +0300
commit643a368fa437725cbfffcfdc251055c4d125438c (patch)
treefec1a88b4e81dbe2da97fa86901332668e43bd5a /app/models/merge_request.rb
parent5e95c0b8d201a6bfdd020aa29a5a6e14c7085e3f (diff)
downloadgitlab-ce-643a368fa437725cbfffcfdc251055c4d125438c.tar.gz
Make merge request diff works with new FileCollection logic
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r--app/models/merge_request.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb
index 7c3845ef538..104f9c7223d 100644
--- a/app/models/merge_request.rb
+++ b/app/models/merge_request.rb
@@ -172,10 +172,10 @@ class MergeRequest < ActiveRecord::Base
end
def diffs(diff_options = nil)
- if self.compare
- self.compare.diffs(diff_options)
+ if compare
+ compare.diffs(diff_options)
else
- Gitlab::Diff::FileCollection::MergeRequest.new(self, diff_options: diff_options)
+ merge_request_diff.diffs(diff_options)
end
end