This project is archived and is in readonly mode.
ActiveRecord::Serialization.serializable_hash uses base :only/:expect for included models
-
michael groble
I saw this same issue today and decided to try to track it down. Attached is a fix. Note the tests verify to_xml, to_json, and serializable_hash all have the same behavior of not passing on :only and :except to includes.
This is the first time I've tried to contribute anything so comments/feedback welcome.
-
John Firebaugh
+1
Existing behavior is quite surprising.
-
Paul Rosania
+1
We ran into this today and it blocks us from leveraging any of the built-in JSON serialization mechanisms with nested objects.
The patch no longer applies cleanly. Can we get this into core if the patch is updated?
-
Pablo
Hello, we are adding an smaller patch for the JSON Serialization.
An additional ticket may be opened for correcting it in XML.
Regards, -
Federico Brubacher
- Tag set to json activerecord serialization
- Assigned user set to Santiago Pastorino
-
Federico Brubacher
Santiago, Jeremy have you guys been able to review this patch ?
