argon/storage/json_rest.js
function update(requestObj, callback) {

            var i, found, storedData, storage;

            storage = this;

            callback = callback || function(){};

            if ((typeof requestObj) === 'undefined' || requestObj === null) {
                callback(null);
                return this;
            }
            
            requestObj.config = {};
            requestObj.config.url = requestObj.config.url || this.url.put;
            requestObj.config.type = requestObj.config.type || this.constructor.REQUEST_TYPE_POST;

            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }

            this.constructor._sendRequest(requestObj, function(data){
                for (i = 0; i < storage.processors.length; i++) {
                    data = storage.processors[i](data, requestObj);
                }
                callback(data);
            });

            return this;
        }
function update(requestObj, callback) {

            var i, found, storedData, storage;

            storage = this;

            callback = callback || function(){};

            if ((typeof requestObj) === 'undefined' || requestObj === null) {
                callback(null);
                return this;
            }
            
            requestObj.config = {};
            requestObj.config.url = requestObj.config.url || this.url.put;
            requestObj.config.type = requestObj.config.type || this.constructor.REQUEST_TYPE_POST;

            if (requestObj.data) {
                for (i = 0; i < storage.preprocessors.length; i++) {
                    requestObj.data = storage.preprocessors[i](requestObj.data, requestObj);
                }
            }

            this.constructor._sendRequest(requestObj, function(data){
                for (i = 0; i < storage.processors.length; i++) {
                    data = storage.processors[i](data, requestObj);
                }
                callback(data);
            });

            return this;
        }
function update ( requestObj , callback ) { var i , found , storedData , storage ; storage = this ; callback = callback || function ( ) { } ; if ( ( typeof requestObj ) === 'undefined' || requestObj === null ) { callback ( null ) ; return this ; } requestObj . config = { } ; requestObj . config . url = requestObj . config . url || this . url . put ; requestObj . config . type = requestObj . config . type || this . constructor . REQUEST_TYPE_POST ; if ( requestObj . data ) { for ( i = 0 ; i < storage . preprocessors . length ; i ++ ) { requestObj . data = storage . preprocessors [ i ] ( requestObj . data , requestObj ) ; } } this . constructor . _sendRequest ( requestObj , function ( data ) { for ( i = 0 ; i < storage . processors . length ; i ++ ) { data = storage . processors [ i ] ( data , requestObj ) ; } callback ( data ) ; } ) ; return this ; }
Updates from the resource
@method put <public>
@argument params <optional> [Object]
@argument callback <optional> [Function]
Updates from the resource