# Getting confused by my associations

**URL:** <https://www.ruby-forum.com/t/getting-confused-by-my-associations/92865>\
**Category:** Rails\
**Created:** [April 25, 2007, 7:12am UTC](https://www.ruby-forum.com/t/getting-confused-by-my-associations/92865 "2007-04-25T07:12:36Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robin\_F](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c2a13f/32.png) [@Robin\_F](https://www.ruby-forum.com/u/Robin_F)\
**Post date:** [April 25, 2007, 7:12am UTC](https://www.ruby-forum.com/t/getting-confused-by-my-associations/92865/1 "2007-04-25T07:12:36Z")

</div>

Hi All,

I’m working on an application whereby each user will have a dashboard  
that will show topics and the associated results for those topics  
based on a quiz taken by the user.

The 3 models in question are:

User  
has\_many :results

Topic  
has\_many :results  
has\_many :users, :through =\> :results

Result  
belongs\_to :user  
belongs\_to :topic

On my dashboard view, I have the topics set out but am completely  
stuck with placing the current user’s (latest) result for that topic  
next to it.

I’m populating a @topics instance variable to iterate over to show the  
topics.

I’d really appreciate a nudge in the correct direction.

Thanks

Robin
