Created
September 15, 2012 18:25
-
-
Save kborchers/3729174 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// All taken from https://github.com/aerogear/aerogear-js/blob/master/src/pipeline/adapters/rest.js | |
// When creating a new REST based pipe, a recordId can be configured | |
// An app using the lib can then use what ever record identifier it wants | |
aerogear.pipeline.adapters.rest = function( pipeName, recordId, settings ) { ... } | |
// Then during a save, I can check for a value assigned to that id to determine the request type | |
type = data[ this.recordId ] ? "PUT" : "POST"; | |
// After that we get into whether or not data sync is happening, etc. but I do not rely on a particular record identifier |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment