Created
August 21, 2014 16:23
-
-
Save abuiles/370cbb513dbcff1ef94a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default DS.ActiveModelAdapter.extend({ | |
namespace: 'api', | |
ajaxError: function(jqXHR) { | |
var error; | |
error = this._super.apply(this, arguments); | |
if (jqXHR && jqXHR.status === 401) { | |
window.location.href = '/users/sign_in'; | |
} | |
return error; | |
} | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment