Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save jorgemanrubia/367167 to your computer and use it in GitHub Desktop.
Save jorgemanrubia/367167 to your computer and use it in GitHub Desktop.
rails 3 ujs driver for jquery - patch for JQuery 1.4.2 and aborted ajax requests
--- rails.js
+++ (clipboard)
@@ -40,10 +40,7 @@
el.trigger('ajax:loading', xhr);
},
success: function (data, status, xhr) {
- if (xhr.status)
el.trigger('ajax:success', [data, status, xhr]);
- else
- el.trigger('ajax:failure', [xhr, "aborted", data]);
},
complete: function (xhr) {
el.trigger('ajax:complete', xhr);
@@ -128,4 +125,3 @@
});
});
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment