Commit 87665170 authored by Sean McGivern's avatar Sean McGivern

Use assigned variables better

parent b8917eb7
......@@ -9,7 +9,7 @@
%table
- discussions = { discussion.original_line_code => discussion }
= render partial: "projects/diffs/line",
collection: discussion.highlighted_diff_lines,
collection: discussion.truncated_diff_lines,
as: :line,
locals: { diff_file: diff_file,
discussions: discussions,
......
......@@ -3,12 +3,10 @@
New comment
- if @note.diff_note? && @note.diff_file
- if @discussion && @discussion.diff_file
on
= link_to @note.diff_file.file_path, @target_url, class: 'details'
\:
- if @discussion
\:
%table
= render partial: "projects/diffs/line",
collection: @discussion.truncated_diff_lines,
......
......@@ -69,7 +69,7 @@ module Gitlab
diff_refs.try(:head_sha)
end
attr_writer :highlighted_diff_lines, :text_parsed_diff_lines
attr_writer :highlighted_diff_lines
# Array of Gitlab::Diff::Line objects
def diff_lines
......
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