ruby on rails - Bizarre AR::Base to_yaml serialization -


i'm trying dump ar models to_yaml, reload in different context. so, doing:

file.open(file, 'w') { |f| f.print mymodel.all.to_yaml } 

however, when view yaml file, see following:

- !ruby/object:mymodel   attributes: *35083880 

that is, attributes 1 of these models pointing of another. incorrect (i've confirmed there no duplicate records), , causes issues re-ingest process (since duplicates id well).

what more bizarre happens sometimes. command above create fine yaml file, no named anchors.

does have idea might going on? i'm using rails 4.1 pretty stock setup (for ar, yaml, etc.).


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -