Use assigned variables better
This commit is contained in:
parent
b8917eb75e
commit
87665170ec
3 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue