# Problem Associating Two Models

**URL:** <https://www.ruby-forum.com/t/problem-associating-two-models/135483>\
**Category:** Rails\
**Created:** [April 22, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/problem-associating-two-models/135483 "2008-04-22T16:42:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dave](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ee7513/32.png) [@dave](https://www.ruby-forum.com/u/dave)\
**Post date:** [April 22, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/problem-associating-two-models/135483/1 "2008-04-22T16:42:03Z")

</div>

I have a List model which holds all of the lists used throughout the  
app. This model has the following fields: id, list, value, sequence.  
To fetch a list of states, you could do something like  
List.find\_by\_list(“states”).

Now I also have a Record model which holds a reference to a User  
model. I also want it to link back to three different lists (state,  
country, and user\_group). These references are independent of each  
other and should be linked by a list ID. Any ideas on how to  
construct the Record model and database structure?

Thanks in advance!

- Dave
