diff --git a/guides/source/working_with_javascript_in_rails.md b/guides/source/working_with_javascript_in_rails.md index a0398a2484..d2eac05b0d 100644 --- a/guides/source/working_with_javascript_in_rails.md +++ b/guides/source/working_with_javascript_in_rails.md @@ -44,7 +44,7 @@ fetch("/test") .then((data) => data.text()) .then((html) => { const results = document.querySelector("#results"); - results.insertAdjacentHTML("beforeend", data); + results.insertAdjacentHTML("beforeend", html); }); ```