aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorDavid Fernandez <dev@10io.net>2014-02-13 11:37:34 +0100
committerDavid Fernandez <dev@10io.net>2014-02-13 11:37:34 +0100
commitd0b251e986ebbf4358ec9d339367387f32d74792 (patch)
tree1f69a4bf616573738b6714df079cef8402e457f2 /guides/source
parent6e61da2dabc30c78de7f5ba8f53f534ced463fb3 (diff)
downloadrails-d0b251e986ebbf4358ec9d339367387f32d74792.tar.gz
rails-d0b251e986ebbf4358ec9d339367387f32d74792.tar.bz2
rails-d0b251e986ebbf4358ec9d339367387f32d74792.zip
Fix coffeescript sample [ci skip]
Replace bind() with on() as suggested by the JQuery bind() documentation: https://api.jquery.com/bind/
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/working_with_javascript_in_rails.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/guides/source/working_with_javascript_in_rails.md b/guides/source/working_with_javascript_in_rails.md
index 3c04204c29..a8695ec034 100644
--- a/guides/source/working_with_javascript_in_rails.md
+++ b/guides/source/working_with_javascript_in_rails.md
@@ -180,7 +180,7 @@ bind to the `ajax:success` event. On failure, use `ajax:error`. Check it out:
$(document).ready ->
$("#new_post").on("ajax:success", (e, data, status, xhr) ->
$("#new_post").append xhr.responseText
- ).bind "ajax:error", (e, xhr, status, error) ->
+ ).on "ajax:error", (e, xhr, status, error) ->
$("#new_post").append "<p>ERROR</p>"
```