Commit 87665170 authored by Sean McGivern's avatar Sean McGivern

Use assigned variables better

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