Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove sort on attributes.keys #5678

Merged
merged 1 commit into from
May 19, 2012
Merged

Remove sort on attributes.keys #5678

merged 1 commit into from
May 19, 2012

Conversation

troyk
Copy link
Contributor

@troyk 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.

@carlosantoniodasilva
Copy link
Member

Hm agreed, no need for sorting at all.

/cc @josevalim

@josevalim
Copy link
Contributor

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

@carlosantoniodasilva
Copy link
Member

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
Copy link
Contributor Author

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.

@rafaelfranca
Copy link
Member

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

carlosantoniodasilva added a commit that referenced this pull request May 19, 2012
Remove sort on attributes.keys
@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
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants