jashmenn / activeuuid

Binary uuid keys in Rails
MIT License
340 stars 124 forks source link

to_yaml support & yaml_db clean export #70

Open Sudrien opened 9 years ago

Sudrien commented 9 years ago

Currently an .to_yaml of a activeuuid::UUID looks like

The human-readable (.to_s) version would be much better for serialization and inter-database compatibility. In my specific case, moving data from MySQL with activeuuid to Postgres with integrated UUID support with the yaml_db plugin.

In my research so far, it looks like the answer may be defining the datatype in the style of lib/yaml/rubytypes.rb - but the versions I can find look like outdated code.