Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save visualjeff/aefec63d012873b2b8032810c2730ba6 to your computer and use it in GitHub Desktop.
Save visualjeff/aefec63d012873b2b8032810c2730ba6 to your computer and use it in GitHub Desktop.
Ember-data JSONAPIAdapter override to address case issues. Camel-case versus kabab-case.
pathForType: function(type) {
type = this._super(...arguments);
if (type === 'building-types') {
type = type.camelize(); //Node API is expects a camelized path for this api signature. i.e., buildingTypes
}
return type;
},
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment