To_xml gives strange results
This issue is closed by merging the 445 pull request: https://github.com/rails/rails/pull/445
Spaces will now be decrypted (and the _dasherize private method will be expanded to handle spaces.)
{"New York" => 33} .to_xml will result in
..<New-York type=\"integer\">33</New-York>..
Thanks for putting up this beacon ticket and the stack question (which added more info in the discussions); with the help of all the information provided, I was able to complete my first rails!
I see the same thing too.
:dasherize to_xml .
. [...] : only,: except,: skip_instruct,: skip_types,: dasherize : camelize [...] dasherize , : dasherize to false. : camelize to true - : dasherize.
, :
asdf.to_xml(:dasherize => true)
, :camelize .
=> "<?xml version="1.0" encoding="UTF-8"?>\n<Hash>\n <New York type="integer">33</New York>\n <Versailles type="integer">3231</Versailles>\n</Hash>\n"
, , - " ".