rubiii/savon — Issue #260: attributes! hash not working properly?
Author: ejholmes
Created: 2012-02-03 07:40:18+00:00
State: open

Not sure if this belongs here or under Gyoku.

```ruby
def create(type, metadata={})
metadata = [metadata] unless metadata.is_a?(Array)
response = @client.request(:create) do |soap|
soap.header = @header
soap.body = {
:metadata => metadata,
:attributes! => { :metadata => { "xsi:type" => type.to_s } }
}
end
response
end
```
The above code produces the following output.

```xml

00DU0000...

crud_test

```
The `xsi:type` attribute isn't being applied.

This is with Savon 0.9.7, Gyoku 0.4.4 and Ruby 1.9.3-p0. Full code here https://github.com/ejholmes/metaforce/blob/002754374508256f26bce621dccc90de0b5f9523/lib/metaforce/api/crud.rb