-
-
Save nicedawg/cae8f8be678155859b6730b144738599 to your computer and use it in GitHub Desktop.
[Beginning Rails 6] Listing 9-7. The Template in app/views/comments/create.js.erb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelector("#comments").insertAdjacentHTML("beforeend", "<%= escape_javascript render @comment %>"); | |
document.querySelector("#main form").reset(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment