Skip to content

Instantly share code, notes, and snippets.

@jiripospisil
Last active December 17, 2015 08:49
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
App.Auth = Ember.Auth.create({
// ...
modules: ["emberModel"]
});
Ember.Auth.Module.EmberModel = Ember.Object.extend({
init: function() {
this.patch();
},
patch: function() {
var self = this;
if (Ember.RESTAdapter) {
Ember.RESTAdapter.reopen({
_ajax: function(url, params, method) {
var settings = {
url: url,
type: method,
dataType: "json",
data: params
};
return self.auth._request.send(settings);
}
});
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment