Skip to content

Commit

Permalink
Merge pull request emberjs#3567 from faizaanshamsi/patch-1
Browse files Browse the repository at this point in the history
Use Ember.$ instead of jQuery for AJAX requests
  • Loading branch information
fivetanley committed Jul 21, 2015
2 parents 90a0011 + d7222ad commit b176443
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/ember-data/lib/system/adapter.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ var Adapter = Ember.Object.extend({
var url = [type.modelName, id].join('/');
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.getJSON(url).then(function(data) {
Ember.$.getJSON(url).then(function(data) {
Ember.run(null, resolve, data);
}, function(jqXHR) {
jqXHR.then = null; // tame jQuery's ill mannered promises
Expand Down Expand Up @@ -134,7 +134,7 @@ var Adapter = Ember.Object.extend({
var url = type;
var query = { since: sinceToken };
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.getJSON(url, query).then(function(data) {
Ember.$.getJSON(url, query).then(function(data) {
Ember.run(null, resolve, data);
}, function(jqXHR) {
jqXHR.then = null; // tame jQuery's ill mannered promises
Expand Down Expand Up @@ -166,7 +166,7 @@ var Adapter = Ember.Object.extend({
query: function(store, type, query) {
var url = type;
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.getJSON(url, query).then(function(data) {
Ember.$.getJSON(url, query).then(function(data) {
Ember.run(null, resolve, data);
}, function(jqXHR) {
jqXHR.then = null; // tame jQuery's ill mannered promises
Expand Down Expand Up @@ -205,7 +205,7 @@ var Adapter = Ember.Object.extend({
var url = [type.typeKey, id].join('/');
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.getJSON(url, query).then(function(data) {
Ember.$.getJSON(url, query).then(function(data) {
Ember.run(null, resolve, data);
}, function(jqXHR) {
jqXHR.then = null; // tame jQuery's ill mannered promises
Expand Down Expand Up @@ -299,7 +299,7 @@ var Adapter = Ember.Object.extend({
var url = type;
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.ajax({
Ember.$.ajax({
type: 'POST',
url: url,
dataType: 'json',
Expand Down Expand Up @@ -341,7 +341,7 @@ var Adapter = Ember.Object.extend({
var url = [type, id].join('/');
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.ajax({
Ember.$.ajax({
type: 'PUT',
url: url,
dataType: 'json',
Expand Down Expand Up @@ -383,7 +383,7 @@ var Adapter = Ember.Object.extend({
var url = [type, id].join('/');
return new Ember.RSVP.Promise(function(resolve, reject) {
jQuery.ajax({
Ember.$.ajax({
type: 'DELETE',
url: url,
dataType: 'json',
Expand Down

0 comments on commit b176443

Please sign in to comment.