Forum: Ruby on Rails Getting confused by my associations

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Caa31faa9e88940a27c37ee758a291b3?d=identicon&s=25 Robin Fisher (Guest)
on 2007-04-25 07:12
(Received via mailing list)
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:

has_many :results

has_many :results
has_many :users, :through => :results

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

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


This topic is locked and can not be replied to.