Not obvious to me at first is that Foxy Fixtures in RoR, where you can specify a foreign key relationship by name, as in:
Depends upon the fact that you didn’t include id: in the fixtures. That is, RoR is not looking into the pirates.yml file to find the “reginald” fixture, and then inserting the “id” from it in.
Rather, it’s applying a hash of the string “reginald” to get the id, and so the id: of reginald had better be derived in the same way.