-
-
Save anonymous/54f9fa49959c593036a8 to your computer and use it in GitHub Desktop.
This file contains 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
// Error — Uncaught TypeError: Cannot set property 'object' of undefined | |
App.Adapter = DS.RESTAdapter.extend({ | |
url: "http://api.tripster.im", | |
serializer: DS.Serializer.extend({ | |
primaryKey: function(type) { | |
var typeString = type.toString.split(".")[1].underscore(); | |
console.log("test"); | |
return typeString + "_id"; | |
} | |
}) | |
}); | |
DS.Adapter.registerTransform('object', { | |
serialize: function(obj) { return obj; }, | |
deserialize: function(obj) { return obj; } | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment