Files
nairobi/app/views/comments/create.js.erb
2020-05-12 23:57:57 +02:00

9 lines
248 B
Plaintext

<% if @comment.root? -%>
var parent_id = "";
<% else -%>
var parent_id = "#" + "<%= "comment_#{@comment.parent_id}" %>";
<% end -%>
App.Comments.reset_form(parent_id);
App.Comments.add_comment(parent_id, "<li><%= j(render @comment) %></li>");