Skip to content

Instantly share code, notes, and snippets.

@nicedawg
Created February 29, 2020 02:41
Show Gist options
  • Save nicedawg/b30f595ec078927ff93ab37f3bb94f14 to your computer and use it in GitHub Desktop.
Save nicedawg/b30f595ec078927ff93ab37f3bb94f14 to your computer and use it in GitHub Desktop.
[Beginning Rails 6] Listing 9-11. The app/views/comments/destroy.js.erb File
var comments = document.querySelector("#comments");
comments.removeChild(document.querySelector("#comment-<%= @comment.id %>"));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment