Hi,
I have a number of .yml fixtures containing data that is loaded into my
db as a migration. Some of this data needs to be cleaned up, so I am
using the admin part of my rail app to do this editing.
I am now hoping to export the edited data back into yaml, so that I can
update my fixture data and drop and recreate the db as I need.
When I do something like:
Colour.find(:all).to_yaml
I get output like:
- !ruby/object:Colour
attributes:
name: Black
id: “1” - !ruby/object:Colour
attributes:
name: Blue
id: “2”
I am hoping to formal the yaml in the same way as the fixtures:
black:
id: 1
name: ‘Black’
blue:
id: 2
name: ‘Blue’
Is this possible or do I have to format the output myself?
Thanks,
GiantCranes