Rails, Ajax and Exceptions? Bring it on.
Recently I’ve been working on a content management system that’s very Ajax heavy. I think Ajax is great, but if your request raises an exception you’re going to get some unexpected results. In the case where your Ajax request is expecting a JavaScript response to evaluate the enduser will sit there with no response and no indication of an error. We can do better than that.
If your application uses Ajax in two or three places, it’s not hard to code for those specific use cases, but what about three or four instances per page? We’ll need to DRY this up.