When I do that
{"New York"=>33, :Versailles => 3231}.to_xml
I get
<?xml version=\"1.0\" encoding=\"UTF-8\"?>
<hash>
<Versailles type=\"integer\">3231</Versailles>
<New York type=\"integer\">33</New York>
</hash>
I would have expected rails to dasherize "New York", no?
This issue is closed via the merging of pull request 445 : https://github.com/rails/rails/pull/445
Spaces will now be dasherized (and the private _dasherize method is enhanced to handle spaces.)
{"New York"=>33}.to_xml will result in
..<New-York type=\"integer\">33</New-York>..
Thanks for putting up this lighthouse ticket & the stackoverflow question (which added more info in the discussions); with the help of all the information provided, I was able to make my first rails commit!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With