summaryrefslogtreecommitdiff
path: root/app/helpers/diff_helper.rb
diff options
context:
space:
mode:
authorDouwe Maan <douwe@selenight.nl>2016-06-20 18:54:53 +0200
committerDouwe Maan <douwe@selenight.nl>2016-07-06 18:50:58 -0400
commit9fc0e11e0dbd541c8c0bca60878178ca94ad34e1 (patch)
tree4ecdb99f6c0247ec8d51eaa1d85aba470a3c890b /app/helpers/diff_helper.rb
parent17ab745e40bf89776ab16de9ba00ebb44d1c85ca (diff)
downloadgitlab-ce-9fc0e11e0dbd541c8c0bca60878178ca94ad34e1.tar.gz
Add DiffFile#blob and #old_blob
Diffstat (limited to 'app/helpers/diff_helper.rb')
-rw-r--r--app/helpers/diff_helper.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/app/helpers/diff_helper.rb b/app/helpers/diff_helper.rb
index a7eedafe314..346b04e40f0 100644
--- a/app/helpers/diff_helper.rb
+++ b/app/helpers/diff_helper.rb
@@ -100,10 +100,11 @@ module DiffHelper
end
end
- def diff_file_html_data(project, diff_commit, diff_file)
+ def diff_file_html_data(project, diff_file)
+ commit = diff_file.content_commit || commit_for_diff(diff_file)
{
blob_diff_path: namespace_project_blob_diff_path(project.namespace, project,
- tree_join(diff_commit.id, diff_file.file_path))
+ tree_join(commit.id, diff_file.file_path))
}
end