// Set up a global AJAX error handler to handle the 401// unauthorized responses. If a 401 status code comes back,// the user is no longer logged-into the system and can not// use it properly.$.ajaxSetup({statusCode: {401: function(){// Redirect the to the login page.location.href = "/";;}}});
in the application.js file solved the problem.
2 comments:
nice snippet!!!
It's very helpful.
Post a Comment