This project is archived and is in readonly mode.
to_xml in ActiveSupport::CoreExtensions::Array::Conversions does not work well with namespaces
Reported by chemicalhen | August 28th, 2008 @ 04:11 PM | in 2.x
If an array consists of elements of the same type that are namespaced, the resulting XML will consists of illegal names.
line 148: options[:root] ||= all? { |e| e.is_a?(first.class) && first.class.to_s != "Hash" } ? first.class.to_s.underscore.pluralize : "records"
If all the elements are of type 'Foo::FooBar', because of the call to 'underscore', the resulting root element will be <foo/foo_bars>, which is illegal XML syntax.
Comments and changes to this ticket
-
chemicalhen August 28th, 2008 @ 04:19 PM
A later call to .dasherize would actually make the resulting root element to be <foo/foo-bars>.
-
josh December 3rd, 2008 @ 03:30 PM
- State changed from new to stale
Sounds interesting, got patch?
Staling out for now.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>