This project is archived and is in readonly mode.
Hash#from_xml converted camelCase to underscore in 2.3.2, doesn't in 2.3.4
-
Denis
And of course the bug title should say Hash#from_xml, not Hash.from_xml.
-
Denis
- Title changed from Hash.from_xml converted camelCase to underscore in 2.3.2, doesn't in 2.3.4 to Hash#from_xml converted camelCase to underscore in 2.3.2, doesn't in 2.3.4
-
Mike Grafton
I agree that it's a mess. I was depending on the de-camelization (i.e. underscoring) as I have a controller that accepts XML in the POST. It was nice (though surprising) that it was auto-magically translated into underscore-style element names, since it meant I could pretty much dump portions of the params Hash into my model as you would in a normal REST POST/PUT operation.
While the behavior may have been wrong, reverting to the old behavior has broken those of us that depend on the new way - without even giving us a good workaround short of monkey-patching.
I wonder if part of the problem here is that this code lives in ActiveSupport, where I suppose it doesn't make a lot of sense to be mucking with the element names as they get turned into a Hash. This seems more the responsibility of the ActionController::ParamsParser.
Wherever it lives, some of us need this behavior back. I think it's best to leave the default behavior as it now stands, but to provide an option to do the underscorization.
-
Jeff Dean
I have an xml feed that comes in in all caps. It used to come in downcased, which I disliked, but wrote my code to accomodate. It now comes in correctly, which I like. What I don't like is being forced to make these changes because of a minor version bump. I'm about to settle into yet another night of converting hash keys, for the second time.
The series of patches leading up to this are irresponsible.
Were there deprecation warnings? No.
Were there blog posts alerting us to these changes? No.
Are there options in ActiveSupport where I can specify how I want tags handled? If so, I can't find them.Core fail.
-
Rohit Arondekar
- Importance changed from to
Any updates here?
I'm afraid your ticket was never opened or looked at by a core member.
-
Santiago Pastorino
- State changed from new to open
This issue has been automatically marked as stale because it has not been commented on for at least three months.
The resources of the Rails core team are limited, and so we are asking for your help. If you can still reproduce this error on the 3-0-stable branch or on master, please reply with all of the information you have about it and add "[state:open]" to your comment. This will reopen the ticket for review. Likewise, if you feel that this is a very important feature for Rails to include, please reply with your explanation so we can consider it.
Thank you for all your contributions, and we hope you will understand this step to focus our efforts where they are most helpful.
-
Santiago Pastorino
- State changed from open to stale