Skip to content

Commit

Permalink
update the commets in the persistable module
Browse files Browse the repository at this point in the history
  • Loading branch information
robrobbins committed Mar 31, 2013
1 parent ba3a612 commit f89042e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions build/debug/sudo-x.js
Original file line number Diff line number Diff line change
Expand Up @@ -1472,7 +1472,7 @@ sudo.extensions.persistable = {
// state of the model on the server and set it here (via a success callback).
//
// `param` {object} `params` Hash of options for the XHR call
// `returns` {object} The jQuery XHR object
// `returns` {object} The XHR object
create: function create(params) {
return this._sendData_('POST', params);
},
Expand All @@ -1481,7 +1481,7 @@ sudo.extensions.persistable = {
// Delete this model on the server
//
// `param` {object} `params` Optional hash of options for the XHR
// `returns` {object} jqXhr
// `returns` {object} Xhr
destroy: function _delete(params) {
return this._sendData_('DELETE', params);
},
Expand All @@ -1500,7 +1500,7 @@ sudo.extensions.persistable = {
// Abstracted logic for preparing the options object. This looks at
// the set `ajax` property, allowing any passed in params to override.
//
// Sets defaults: JSON responseType and an onload callback that simply `sets()` the
// Sets defaults: `text` responseType and an onload callback that simply `sets()` the
// parsed response returned from the server
//
// `returns` {object} A normalized params object for the XHR call
Expand Down Expand Up @@ -1546,15 +1546,15 @@ sudo.extensions.persistable = {
// or has been loaded/refreshed from the server.
//
// `param` {object} `params` Hash of options for the XHR call
// `returns` {object} The jQuery XHR object
// `returns` {object} The XHR object
save: function save(params) {
return ('id' in this.data) ? this.update(params) : this.create(params);
},
// ###_sendData_
// The Create, Update and Patch methods all send data to the server,
// varying only in their HTTP method. Abstracted logic is here.
//
// `returns` {object} jqXhr
// `returns` {object} Xhr
_sendData_: function _sendData_(verb, params) {
var opts = this._normalizeParams_(verb, null, params),
xhr = this._getXhr_(opts);
Expand All @@ -1573,7 +1573,7 @@ sudo.extensions.persistable = {
// or use the `save()` method (that does check).
//
// `param` {object} `params` Optional hash of options for the XHR
// `returns` {object|bool} the jqXhr if called false if not
// `returns` {object|bool} the Xhr if called false if not
update: function update(params) {
return this._sendData_((this.data.ajax.patch || params && params.patch) ?
'PATCH' : 'PUT', params);
Expand Down

0 comments on commit f89042e

Please sign in to comment.