Skip to content

Instantly share code, notes, and snippets.

@abuiles
Created August 21, 2014 16:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abuiles/370cbb513dbcff1ef94a to your computer and use it in GitHub Desktop.
Save abuiles/370cbb513dbcff1ef94a to your computer and use it in GitHub Desktop.
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