Reputation: 13693
When debugging things in a Rails console, I'd like to prevent .to_yaml
or the y
helper to set up references for the same objects because these references make the output hard to read.
How can I do that?
Upvotes: 2
Views: 263
Reputation: 369536
I don't think you can do that. After all, it wouldn't be the same object graph, in particular, it wouldn't actually be the object graph you are serializing, and I'm pretty sure there is no option in the YAML serializer to serialize an object graph to a representation of a different object graph.
Upvotes: 1