This project is archived and is in readonly mode.

#925 ✓stale

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

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=""></a>

People watching this ticket