Remove sort on attributes.keys #5678

merged 1 commit into from May 19, 2012


None yet

4 participants

troyk commented Mar 31, 2012

Couldn't find a reason the keys are sorted and my preference would be for the hash to be remain in whatever order the attributes hash is.


Hm agreed, no need for sorting at all.

/cc @josevalim


On the other hand, sorting doesn't hurt and gives a nice consistency in the output.


Yeah agreed, it doesn't hurt.. but in the case of consistency, unsure if only attributes sorting would be enough, given it adds methods and associations after the attributes. Anyway, ok to close it so?

troyk commented May 1, 2012

@josevalim @carlosantoniodasilva it's not consistent with the underlying data model, nor any other form of ActiveModel/Record introspection methods. You guys are much more familiar with the code base than I, but I think this is the only time the attributes are represented as a sorted set.


@josevalim @carlosantoniodasilva do we have a definition for this pull request?

@carlosantoniodasilva carlosantoniodasilva merged commit f20032f into rails:master May 19, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment