Created
November 21, 2012 16:04
-
-
Save daveknapik/4125684 to your computer and use it in GitHub Desktop.
Rails 3.1 UJS callback example implementation in CoffeeScript
This file contains hidden or 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
$ -> | |
$("#search-form").on | |
"ajax:beforeSend": (e, xhr, settings) -> | |
console.log e | |
console.log xhr | |
console.log settings | |
"ajax:success": (e, data, status, xhr) -> | |
console.log e | |
console.log data | |
console.log status | |
console.log xhr | |
"ajax:complete": (e, xhr, status) -> | |
console.log e | |
console.log xhr | |
console.log status | |
"ajax:error": (e, xhr, status, error) -> | |
console.log e | |
console.log xhr | |
console.log status | |
console.log error |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment