Loading data model with Fixtures in Rails

I’m putting together a smallish data model in Rails. Some of my data is pre-existing, including a bunch of Items, some of which have SubItems. I found some hints on how to represent the initial data with YAML and to piggy-back on the Fixture functionality to load it in a migration, all from Agile Web Development with Rails.

The mailing list pointed out I can use Ruby calls in the YAML mark-up to build the relationships.

This entry was posted in Uncategorized and tagged . Bookmark the permalink.