jfrankov
2008-May-13 20:26 UTC
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 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---