# Fixtures on fixtures

**URL:** <https://www.ruby-forum.com/t/fixtures-on-fixtures/70634>\
**Category:** Rails\
**Created:** [October 1, 2006, 6:16am UTC](https://www.ruby-forum.com/t/fixtures-on-fixtures/70634 "2006-10-01T06:16:17Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pupeno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/fbc32d/32.png) [@Pupeno](https://www.ruby-forum.com/u/Pupeno)\
**Post date:** [October 1, 2006, 6:16am UTC](https://www.ruby-forum.com/t/fixtures-on-fixtures/70634/1 "2006-10-01T06:16:17Z")

</div>

Hello,  
Is there some way to access other fixtures’ records by name in one  
fixture ?  
I have a complex set of relationships and I’d like to be able to do:  
order:  
id: 1  
person: persons(:john) # defined on the people fixtures

instead of  
order:  
id: 1  
person\_id: 1 # john

Is that possible ?  
Thank you.

---

<div class="post-metadata">

**Author:** ![Pupeno](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/fbc32d/32.png) [@Pupeno](https://www.ruby-forum.com/u/Pupeno)\
**Post date:** [April 18, 2007, 1:43am UTC](https://www.ruby-forum.com/t/fixtures-on-fixtures/70634/2 "2007-04-18T01:43:14Z")

</div>

As far as I know there is not.  
I would really like that, though.  
or:  
order:  
id: 1  
person: :john # defined on the people fixtures

Pupeno wrote:

> Hello,  
> Is there some way to access other fixtures’ records by name in one  
> fixture ?  
> I have a complex set of relationships and I’d like to be able to do:  
> order:  
> id: 1  
> person: persons(:john) # defined on the people fixtures
> 
> instead of  
> order:  
> id: 1  
> person\_id: 1 # john
> 
> Is that possible ?  
> Thank you.
