diff --git a/guides/source/working_with_javascript_in_rails.md b/guides/source/working_with_javascript_in_rails.md index 3f00c71596..c36b3faa6c 100644 --- a/guides/source/working_with_javascript_in_rails.md +++ b/guides/source/working_with_javascript_in_rails.md @@ -475,7 +475,7 @@ respond to your Ajax request. You then have a corresponding code that will be sent and executed on the client side. ```erb -$("#users").appendTo("<%= raw escape_javascript(render @user) %>"); +$("<%= escape_javascript(render @user) %>").appendTo("#users"); ``` Turbolinks