i am running into an issue with updates to nested attributes for referenced documents not being persisted
> u = User.first
=> #<User...
> u.changes
=> {}
> u.profile.changes
=> {}
> u.attributes = {:profile_attributes => {:weight => 8}}
=> {:profile_attributes=>{:weight=>8}}
> u.changes
=> {}
> u.profile.changes
=> {"weight"=>[14.0, 8.0]}
> u.update
=> true
> u.shipping_profile.changes
=> {"weight"=>[14.0, 8.0]}
update/update_attributes/save all do not persist the nested changes.
i have attr_accessible :profile_attributes declared in the user model.
what is needed for nested attributes to persist when the parent document is already persisted?
turns out its a mongoid issue. i submit a pull request with the failing test here https://github.com/mongoid/mongoid/pull/978 for anyone else having the same issue. im just manually saving/updating nested records until its resolved