#521 ✓resolved
Jeremy Nicoll

docs/associations.html should have more docs about :through

Reported by Jeremy Nicoll | August 8th, 2008 @ 01:23 PM

In the model that is the target of the :through, it is important that it has the belongs_to for the two other tables. For example:

class User

has n, :user_categories

has n, :categories, :through => :user_categories


class UserCategory

belongs_to :user

belongs_to :category


This may not be obvious to everyone and I feel it would be beneficial to have this on the docs page for associations.

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

People watching this ticket