Issue #289. Enable the use of jQuery.Deferred by returning Deferred objects from save() and fetch() calls.

This commit is contained in:
Jeremy Ashkenas
2011-04-18 17:08:34 -04:00
parent 37ddad508d
commit 222d673dcc
2 changed files with 13 additions and 19 deletions

View File

@@ -1,14 +1,11 @@
$(document).ready(function() {
module("Backbone.sync");
// Variable to catch the last request.
window.lastRequest = null;
// Stub out jQuery.ajax...
$.ajax = function(obj) {
lastRequest = obj;
};
module("Backbone.sync", {setup : function() {
window.lastRequest = null;
$.ajax = function(obj) {
lastRequest = obj;
};
}});
var Library = Backbone.Collection.extend({
url : function() { return '/library'; }