Export fixture data that preserves foreign key/ActiveRecord associations?

I use the manage_fixtures and fixture_scenarios plugins (and they’re
great) but neither one does what I really want: to export fixtures
from a database that also exports any records associated with those
fixtures. In other words, an intelligent export that follows foreign
keys.

For example, if I had a cars table, and a car with id 1 that had a
foreign key color_id = 7, I’d want to export car 1 into the cars.yml
fixture, and also color 7 into the colors.yml fixture.

Anyone know of a way to do this, or should I write one?

Thanks!
-Jason

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs