From a286f920508368eafabdb934cc2f50e04e5c8ada Mon Sep 17 00:00:00 2001 From: skv Date: Wed, 24 Sep 2014 11:35:13 +0400 Subject: blame with rugged --- app/views/projects/blame/show.html.haml | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'app/views/projects/blame') diff --git a/app/views/projects/blame/show.html.haml b/app/views/projects/blame/show.html.haml index 64bbd495102..464e7ca40e1 100644 --- a/app/views/projects/blame/show.html.haml +++ b/app/views/projects/blame/show.html.haml @@ -10,8 +10,7 @@ %span.options= render "projects/blob/actions" .file-content.blame.highlight %table - - current_line = 1 - - @blame.each do |commit, lines| + - @blame.each do |commit, lines, since| - commit = Commit.new(commit) %tr %td.blame-commit @@ -23,14 +22,9 @@ = link_to_gfm truncate(commit.title, length: 20), project_commit_path(@project, commit.id), class: "row_title" %td.lines.blame-numbers %pre - - if lines.empty? - = current_line - - current_line += 1 - - else - - lines.each do |line| - = current_line - \ - - current_line += 1 + - (since...(since + lines.count)).each do |i| + = i + \ %td.lines %pre %code{ class: highlightjs_class(@blob.name) } -- cgit v1.2.3