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.
Remove sort on attributes.keys
Hm agreed, no need for sorting at all.
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?
@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?
Avoid Skip in test, have a unified test for order