This project is archived and is in readonly mode.
Disambiguate attributes on ActiveResource errors
Reported by Brian Durand | April 18th, 2011 @ 04:13 PM
The attached patch fixes an issue with deserializing errors returned from the server for ActiveResource records. The code for deserializing looks for the humanized name in the error messages to determine which errors belong to which attribute. However, when attributes start with the same word (i.e. "name" and "name_source"), the errors can be assigned incorrectly. The fix sorts attributes by length (descending) so that longer names are always assigned first if they exist.
Comments and changes to this ticket
-
Brian Durand April 18th, 2011 @ 04:24 PM
- Tag changed from activeresource to activeresource, patch
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>
People watching this ticket
- Nobody is watching this ticket.