Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP


Disambiguate attributes on ActiveResource errors #1032

lighthouse-import opened this Issue · 1 comment

1 participant

Lighthouse Import
Lighthouse Import

Imported from Lighthouse. Original ticket at:
Created by Brian Durand - 2011-04-18 15:13:14 UTC

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.

Bruno Alvares da Costa brunoadacosta referenced this issue from a commit in brunoadacosta/rails
John Paul Ashenfelter johnpaulashenfelter Closes GH #1032
Fixed what looks like minor cut/paste error in documentation for ActiveRecord::Locking:Pessimistic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.