rails/rails — pull request #4881 by al2o3cr (2012-02-04 23:06:09+00:00)
Title: Make ActiveResource error parsing interoperate with ActionController

This is a revised and expanded version of the solution in pull request #3046. I've added deprecated paths for older-style responses and updated the documentation.

To summarize the discussion, ActiveResource currently fails to correctly parse errors issued by `ActionController::Responder` when using the default JSON format. This patch corrects that behavior, and includes handling for both the previously documented format (an "errors" key, with an array of messages) and the previous behavior of `ActionController::Responder` (a hash of attributes and errors, no root key) that was corrected in #3272 for Rails 3.2.