#989 ✓not-applicable

has n through doesn't load associations correctly with .all

Reported by embwbam | July 27th, 2009 @ 07:50 AM


Run the above example, then check it out in irb. If you fetch the posts with one = Post.first, then print out one.tags, it shows both tags. If you use posts = Post.all, then one = posts[0], however, one.tags will show you only the first tag assignment, and posts[1].tags will show you the other tag.

It seems to be mixing up the associations when loaded lazily.

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 »