Commit c6d71b7b authored by Riyad Preukschas's avatar Riyad Preukschas

Rename 'notes/per_line_show' partial to 'notes/per_line_note'

parent dd1b3177
...@@ -21,6 +21,6 @@ ...@@ -21,6 +21,6 @@
- comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at) - comments = @line_notes.select { |n| n.line_code == line_code }.sort_by(&:created_at)
- unless comments.empty? - unless comments.empty?
- comments.each_with_index do |note, i| - comments.each_with_index do |note, i|
= render "notes/per_line_show", note: note = render "notes/per_line_note", note: note
- @line_notes.reject!{ |n| n == note } - @line_notes.reject!{ |n| n == note }
= render "notes/per_line_reply_button", line_code: line_code = render "notes/per_line_reply_button", line_code: line_code
...@@ -12,8 +12,8 @@ ...@@ -12,8 +12,8 @@
var trEl = $(".#{note.line_code}").parent(); var trEl = $(".#{note.line_code}").parent();
// ... and insert the note and the reply button after it // ... and insert the note and the reply button after it
trEl.after("#{escape_javascript(render "notes/per_line_reply_button", line_code: note.line_code)}"); trEl.after("#{escape_javascript(render "notes/per_line_reply_button", line_code: note.line_code)}");
trEl.after("#{escape_javascript(render "notes/per_line_show", note: note)}"); trEl.after("#{escape_javascript(render "notes/per_line_note", note: note)}");
} else { } else {
// instert new note before reply button // instert new note before reply button
trRpl.before("#{escape_javascript(render "notes/per_line_show", note: note)}"); trRpl.before("#{escape_javascript(render "notes/per_line_note", note: note)}");
} }
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