mongoid/mongoid — Issue #1512: update_attributes is not updating the field under certain situation
Author: phuongnd08
Created: 2011-12-20 03:38:26+00:00
State: open

Look at this example ruby snippet

```ruby
class XConfig
include Mongoid::Document
field :samples, :type => Hash
field :summary_fields, :type => Array
field :filters, :type => Array
end

xc = XConfig.create
xc.update_attributes(
:samples => {
"food.ingredient" => "example"
},
:summary_fields => [ "collection", "description", "inactive" ],
:filters => [{ :new => true }]
)

xc.reload.samples
xc.reload.filters
```
So after updated the XConfig instance attributes, I reload it
What I expect: The hash passed to the update_attribute
What I actually get: nil and nil