Veraticus/Dynamoid — pull request #65 by jonspalding (2012-06-24 17:34:24+00:00)
Title: Can't delete object with DateTime range key

Given a class with a DateTime range key such as:

```ruby
class Message
include Dynamoid::Document
table name: :messages, key: :message_id
range :time, :datetime
field :text
end
```

The AWS SDK will throw an error about DateTime being an unsupported attribute class when delete or destroy is called on the object. This is because the range key field isn't marshalled into it's persisted type (Float).

This pull request fixes the issue by using the dump_field method to convert the range key. Also added a test.

I believe this will also be a problem when updating an object but wasn't able to test properly as updating seems to be broken on master. I think this is down to the method Dynamoid::Adapter.update_item not being present but being called from Dynamoid::Persistence.update.