Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Add params to Ember Data's RESTAdapter AJAX requests.
App.accountId = 'asdf';
App.RESTAdapter = DS.RESTAdapter.extend({
// Scope all ajax calls.
ajax: function(url, type, hash) {
if (Ember.isEmpty(hash)) hash = {};
if (Ember.isEmpty( = {}; = App.accountId;
this._super(url, type, hash);
App.Store = DS.Store.extend({
revision: 12,
adapter: "App.RESTAdapter"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment