Recently after upgrading a Rails app to Rails 2.3.4 I noticed my Soap service calls throwing errors. After a little investigation I found this commit:
The problem is that since String#underscore lowercases the string, any Hashes created using Hash.from_xml with xml that contain any capital letters in the node names will break when updating to Rails 2.3.4.
XML is case-sensitive, so reverting back to using underscore probably isn’t going to happen, but this is definitely something that should have been a bigger focus at the release of 2.3.4.
For apps using Hash.to_xml that would like to upgrade to Rails 2.3.4 with there existing codebase, I created a small plugin to revert back to the using .underscore when creating a hash from XML.
4 Comments
Bradly, did you happen to publish your small plugin that fixes the Rails 2.3.4 case issue with Hash.from_xml?
Hi Mark,
Yes, it is on Github here:
http://github.com/bradly/rails_hash_from_xml_compatibility_fix
Hi Bradly,
I am helping recruit for a Ruby on Rails developer for a startup company in San Diego and came across your profile today on Linked In. My client is looking for outstanding developers with a can-do, entrepreneurial spirit and a good background with Ruby. Are you in the market for a new opportunity? If so, let’s chat – I’d love to talk to you more.
I look forward to hearing back from you!
Meredith
Technical Recruiter
meredithmanchack@yahoo.com
My friend and I were arguing about this! Now I know that I was right. lol! Thanks for making me sure!
Sent from my iPad 4G