ActiveResource 3.0.1 drops attributes in array structure

Hi,

I am trying to create an ActiveResource model from a REST API with a XML structure as follows:

<document>   <elements>     <element name="title" >Dragon Stories</element>     <element name="lang" >en</element>     <element name="region" >UK</element>   </elements> </document>

The ActiveResource model I get from consuming the source approve misses the values of the name attributes, however, and return a flat array:

#<Document:0x10525a408 @attributes={"elements"=>#<Document::Elements: 0x105251240 @attributes={"element"=>["Dragon Stories", "en", "UK"]}, @prefix_options={}>}, @prefix_options={}>

How can I fix this?

Thanks + kind regards, Boris

Found this related issue:

https://rails.lighthouseapp.com/projects/8994-ruby-on-rails/tickets/1598-preserve-xml-attributes-with-hashfrom_xml-and-activeresource

I am still clueless how to best cope with this issue. Thanks in advance for any support.