summaryrefslogtreecommitdiff
path: root/app/views/projects/diffs/_stats.html.haml
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-08-01 17:56:09 +0100
committerPhil Hughes <me@iamphill.com>2017-08-03 17:03:49 +0100
commit86d34921fee9ec324fdce3d36a8557604851a619 (patch)
treede75b2ae8a79a6153e5a0440b093153728859d39 /app/views/projects/diffs/_stats.html.haml
parent0c5e41a20fcdafb351eb2e62279b89eed81de426 (diff)
downloadgitlab-ce-86d34921fee9ec324fdce3d36a8557604851a619.tar.gz
dont assign to variable, just output directly
Diffstat (limited to 'app/views/projects/diffs/_stats.html.haml')
-rw-r--r--app/views/projects/diffs/_stats.html.haml9
1 files changed, 3 insertions, 6 deletions
diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml
index 38fccb3d44f..efc0ea31917 100644
--- a/app/views/projects/diffs/_stats.html.haml
+++ b/app/views/projects/diffs/_stats.html.haml
@@ -20,18 +20,15 @@
.dropdown-content
%ul
- diff_files.each do |diff_file|
- - file_hash = hexdigest(diff_file.file_path)
- - added_lines = diff_file.added_lines
- - removed_lines = diff_file.removed_lines
%li
- %a{ href: "##{file_hash}", title: diff_file.new_path }
+ %a{ href: "##{hexdigest(diff_file.file_path)}", title: diff_file.new_path }
= icon("#{diff_file_changed_icon(diff_file)} fw", class: "#{diff_file_changed_icon_color(diff_file)} append-right-5")
%span.diff-file-changes-path= diff_file.new_path
.pull-right
%span.cgreen<
- +#{added_lines}
+ +#{diff_file.added_lines}
%span.cred<
- \-#{removed_lines}
+ \-#{diff_file.removed_lines}
%li.dropdown-menu-empty-link.hidden
%a{ href: "#" }
No files found.