This project is archived and is in readonly mode.

#1956 ✓committed
Fabien Jakimowicz

[PATCH] json validations errors for ActiveResource

Reported by Fabien Jakimowicz | February 13th, 2009 @ 12:18 AM | in 2.3.6

ActiveResource can interpret validations errors from xml body, but not from json and even worse : he tries to interpret json output as xml and parse it.

This patch adds json support for validations errors based on the work of Rick Olson. You can render errors in json like this : render :json => @person.errors.to_json, :status => 422

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>