Skip to content

Instantly share code, notes, and snippets.

@aaronj1335
Created September 17, 2013 01:24
Show Gist options
  • Select an option

  • Save aaronj1335/6588972 to your computer and use it in GitHub Desktop.

Select an option

Save aaronj1335/6588972 to your computer and use it in GitHub Desktop.
App.ApplicationAdapter = DS.RESTAdapter.extend({
host: 'https://api.github.com',
headers: {
authorization: 'basic ' + btoa(username + ':' + password)
},
serializer: DS.RESTSerializer.extend({
extractArray: function (store, primaryType, payload) {
var o = {};
o[this.pluralize(primaryType.typeKey)] = payload;
return this._super(store, primaryType, o);
}
}).create()
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment