Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
fix multiple calls to the options method of the ajax service (#146)
Browse files Browse the repository at this point in the history
ajaxOptions is not overriden anymore in the ajax-support mixin, and is
not called anymore by the ajax method, as it is not needed by ember-ajax
and is a private method of the ember-data adapter
  • Loading branch information
kketch authored and alexlafroscia committed Sep 8, 2016
1 parent 7941644 commit c68bdf5
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions addon/mixins/ajax-support.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,8 @@ export default Mixin.create({
*/
headers: alias('ajaxService.headers'),

ajax(url, type, options) {
options = this.ajaxOptions(...arguments);
return this.get('ajaxService').request(url, options);
},

ajaxOptions(url, type, options = {}) {
ajax(url, type, options={}) {
options.type = type;
return this.get('ajaxService').options(url, options);
return this.get('ajaxService').request(url, options);
}
});

0 comments on commit c68bdf5

Please sign in to comment.