This project is archived and is in readonly mode.

#5965 ✓ duplicate
Claudio Poli

Rails 2.3 AR JSON validation errors incorrect format

Reported by Claudio Poli | November 13th, 2010 @ 02:54 AM

A simple

    format.json { render :json => @playlist.errors, :status => :unprocessable_entity }

results in:

 "[["name","can't be blank"],["name","is too short (minimum is 1 characters)"]]"

I believe it should be like the XML counterpart:

 "{"errors":[...

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 »

Tickets have moved to Github

The new ticket tracker is available at https://github.com/rails/rails/issues

Shared Ticket Bins

People watching this ticket

Pages