var $form = $("form#new_blog_comment");
<% if @comment.save %>
  $("#comments").append("<%= escape_javascript(render(@comment)) %>");
  $form.get(0).reset();
<% else %>
  $form.html("<%= escape_javascript(render('form')) %>");
<% end %>
var $form = $("form#new_blog_comment");
<% if @comment.save %>
  $("#comments").append("<%= escape_javascript(render(@comment)) %>");
  $form.get(0).reset();
<% else %>
  $form.html("<%= escape_javascript(render(partial:'form', locals: { post: @comment.post, comment: @comment })) %>");
<% end %>

Fix error when adding an active_record comment
Fix error when adding an active_record comment
