Skip to content

Instantly share code, notes, and snippets.

@ttdonovan
Created November 20, 2008 21:50
Show Gist options
  • Select an option

  • Save ttdonovan/27225 to your computer and use it in GitHub Desktop.

Select an option

Save ttdonovan/27225 to your computer and use it in GitHub Desktop.
diff --git a/server/couchdb_server.js b/server/couchdb_server.js
index 420f280..66a19db 100755
--- a/server/couchdb_server.js
+++ b/server/couchdb_server.js
@@ -361,7 +361,7 @@ SC.CouchdbServer = SC.Server.extend({
records.each(function(r) {
var primaryKey = r.get('primaryKey') ;
var context = {
- recordType: this._instantiateRecordType(curRecords[0].get('type'), this.prefix, null), // default rec type.
+ recordType: this._instantiateRecordType(r.get('type'), this.prefix, null), // default rec type.
onSuccess: options.onSuccess,
onFailure: options.onFailure
};
@@ -372,8 +372,8 @@ SC.CouchdbServer = SC.Server.extend({
_onFailure: this._refreshFailure.bind(this)
};
// issue request
- this.request(resource, this._refreshAction, [r.get(primaryKey)], params, this._refreshMethod) ;
- });
+ this.request(r, this._refreshAction, [r.get(primaryKey)], params, this._refreshMethod) ;
+ }, this);
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment