app/assets/javascripts/ember-auth/ember-auth.js in ember-auth-rails-3.6.1 vs app/assets/javascripts/ember-auth/ember-auth.js in ember-auth-rails-3.7.0

- old
+ new

@@ -104,10 +104,15 @@ } else { return this.prevRoute; } }, ajax: function(url, type, hash) { + var token; + if (token = this.get('authToken')) { + hash.data || (hash.data = {}); + hash.data[Auth.Config.get('tokenKey')] = this.get('authToken'); + } hash.url = url; hash.type = type; hash.dataType = 'json'; hash.contentType = 'application/json; charset=utf-8'; if (hash.data && type !== 'GET') { @@ -173,14 +178,9 @@ } }); Auth.RESTAdapter = DS.RESTAdapter.extend({ ajax: function(url, type, hash) { - var token; - if (token = Auth.get('authToken')) { - hash.data || (hash.data = {}); - hash.data[Auth.Config.get('tokenKey')] = Auth.get('authToken'); - } hash.context = this; return Auth.ajax(url, type, hash); } });