Commit c2cfc52e authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

fix merge request diff

parent 570f63da
- @diffs.each do |diff|
- @diffs.each_with_index do |diff, i|
- next if diff.diff.empty?
- file = (@commit.tree / diff.b_path)
- next unless file
......@@ -12,7 +12,7 @@
%br/
.diff_file_content
- if file.text?
= render :partial => "commits/text_file", :locals => { :diff => diff }
= render :partial => "commits/text_file", :locals => { :diff => diff, :index => i }
- elsif file.image?
.diff_file_content_image
%img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment