Extract 'notes/per_line_notes_with_reply' partial
This commit is contained in:
parent
a3dbd99068
commit
e1ca155c95
2 changed files with 4 additions and 4 deletions
|
@ -20,7 +20,4 @@
|
|||
- if @comments_allowed
|
||||
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at)
|
||||
- unless comments.empty?
|
||||
- comments.each_with_index do |note, i|
|
||||
= render "notes/per_line_note", note: note
|
||||
- @line_notes.reject!{ |n| n == note }
|
||||
= render "notes/per_line_reply_button", line_code: line_code
|
||||
= render "notes/per_line_notes_with_reply", notes: comments
|
||||
|
|
3
app/views/notes/_per_line_notes_with_reply.html.haml
Normal file
3
app/views/notes/_per_line_notes_with_reply.html.haml
Normal file
|
@ -0,0 +1,3 @@
|
|||
- notes.each do |note|
|
||||
= render "notes/per_line_note", note: note
|
||||
= render "notes/per_line_reply_button", line_code: notes.first.line_code
|
Loading…
Add table
Reference in a new issue