-
Type: Task
-
Resolution: Done
-
Affects Version/s: None
-
Component/s: None
-
Labels:
It seems that passing :only options to serializable_hash affects the serialization of :includes.
<pre>
person.serializable_hash(:include => :addresses)['addresses']
> "addresses"=>[
,
{"_id"=>"tauentzienstr", "street"=>"Tauentzienstr"}]
person.serializable_hash(:include => :addresses, :only => [:age, :blood_alcohol_content])['addresses']
>"addresses"=>[{}, {}]
</pre>
I've committed some failing specs:
https://github.com/njorden/mongoid/commit/0ceea8a4c4b3ace9d4892327ef228fe01df99154
I'm glad to investigate a solution, as long as I'm not missing something obvious or misunderstanding how this should be working. Any thoughts?
Thanks