Mark Imbriaco successfully answered Rich Collins's question:

How can I make better use of abstraction in rails fixtures?  I don't like constantly repeating myself and having to remember the primary key value when adding foriegn key values ... etc

People succeed in answering Rich Collins's questions 37% of the time (32 successes in 86 attempts).

Answers by: Mark Imbriaco | Fear of Fish | Adam Thorsen

Mark Imbriaco's Answer:

Reply by Mark Imbriaco 918 days ago

There's a fairly ugly way to accomplish this with the existing fixtures functionality:

posts.yml:

<% rich = User.find_by_name('Rich') %>

fist_post_by_rich:
id: 1
user_id: <%= rich.id %>

Reply by Rich Collins 917 days ago

Thanks should have thought of that one. It is a bit ugly as you have to do it for each fixture file but still better than the way I have been. Perhaps I should do some fixtures plugin in my "spare time"