Commit c2cfc52e449a7bcd817909ace4ab8926509ee4f2

Authored by Dmitriy Zaporozhets
1 parent 570f63da

fix merge request diff

Showing 1 changed file with 2 additions and 2 deletions   Show diff stats
app/views/merge_requests/_diffs.html.haml
1   -- @diffs.each do |diff|
  1 +- @diffs.each_with_index do |diff, i|
2 2 - next if diff.diff.empty?
3 3 - file = (@commit.tree / diff.b_path)
4 4 - next unless file
... ... @@ -12,7 +12,7 @@
12 12 %br/
13 13 .diff_file_content
14 14 - if file.text?
15   - = render :partial => "commits/text_file", :locals => { :diff => diff }
  15 + = render :partial => "commits/text_file", :locals => { :diff => diff, :index => i }
16 16 - elsif file.image?
17 17 .diff_file_content_image
18 18 %img{:src => "data:#{file.mime_type};base64,#{Base64.encode64(file.data)}"}
... ...