diff options
author | Herminio Torres <herminiocesar@gmail.com> | 2016-08-04 01:04:01 -0300 |
---|---|---|
committer | Herminio Torres <herminiocesar@gmail.com> | 2016-08-04 01:22:54 -0300 |
commit | bb193801f892490d64cfe34563a77a7ae90ff5d8 (patch) | |
tree | ead69173cd499ebe6b6d2666387666689e8017d9 /app | |
parent | 532202a5278a622de874b9dfc1c4f7fe9ddf5ce4 (diff) | |
download | gitlab-ce-bb193801f892490d64cfe34563a77a7ae90ff5d8.tar.gz |
Fix Mystery Guest
Magic Variable - Change the name of the variable to assign the local variable for partial, rather than `i` use the `index`.
Don't pass a local variable called `i` to a partial.
Diffstat (limited to 'app')
-rw-r--r-- | app/views/projects/diffs/_diffs.html.haml | 2 | ||||
-rw-r--r-- | app/views/projects/diffs/_file.html.haml | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 20dc280c3b2..ebaf939f930 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -29,5 +29,5 @@ - next unless blob - blob.load_all_data!(diffs.project.repository) unless blob.only_display_raw? - = render 'projects/diffs/file', i: index, project: diffs.project, + = render 'projects/diffs/file', index: index, project: diffs.project, diff_file: diff_file, diff_commit: diff_commit, blob: blob diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index f914e13a1ec..f0a86fd6d40 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -1,6 +1,6 @@ -.diff-file.file-holder{id: "diff-#{i}", data: diff_file_html_data(project, diff_file)} +.diff-file.file-holder{id: "diff-#{index}", data: diff_file_html_data(project, diff_file)} .file-title{id: "file-path-#{hexdigest(diff_file.file_path)}"} - = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "#diff-#{i}" + = render "projects/diffs/file_header", diff_file: diff_file, blob: blob, diff_commit: diff_commit, project: project, url: "#diff-#{index}" - unless diff_file.submodule? .file-actions.hidden-xs |