rails/rails — pull request #5075 by bogdan (2012-02-17 16:18:46+00:00)
Title: AM::Errors: allow :full_messages parameter for #to_json

Some applications uses full messages in frontend.

In order to support that
Added full messages parameter to `#to_json` method:

``` ruby
@user.error.to_json(:full_messages => true)
# => "{email: \"Email is invalid\", password: \"Password is too short\"}"
```