Permalink
Browse files

missing parameters for "ajax:beforeSend" and "ajax:complete"

  • Loading branch information...
1 parent 9478713 commit 7c00c3c859f3072f9cded930728f18f3bf9e3c52 @JangoSteve JangoSteve committed with mislav Jan 8, 2011
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/rails.js
View
@@ -34,14 +34,14 @@
$.ajax({
url: url, type: method, data: data, dataType: dataType,
// stopping the "ajax:beforeSend" event will cancel the ajax request
- beforeSend: function(xhr) {
- return fire(element, 'ajax:beforeSend', xhr);
+ beforeSend: function(xhr, settings) {
+ return fire(element, 'ajax:beforeSend', [xhr, settings]);
},
success: function(data, status, xhr) {
element.trigger('ajax:success', [data, status, xhr]);
},
- complete: function(xhr) {
- element.trigger('ajax:complete', xhr);
+ complete: function(xhr, status) {
+ element.trigger('ajax:complete', [xhr, status]);
},
error: function(xhr, status, error) {
element.trigger('ajax:error', [xhr, status, error]);

0 comments on commit 7c00c3c

Please sign in to comment.