HABTM Question

OK, I’m working on a simple site to share music created by users from
a forum I belong to. I’m trying to make it so users can follow other
users to keep track of what they’re up to (sort of like Twitter if you
know how that works).

Currently I’m working on the page that displays the users that follow
a certain user, I can easily do the reverse of this (see what users a
certain user is follow, user.friends) but I can’t do it the other way.

Does Rails have a built-in method for this (I’ve searched the API
docs, and the Agile Web Dev book with no luck)?

Thanks,
Tony

On Sep 1, 10:10 pm, TeeC [email protected] wrote:

OK, I’m working on a simple site to share music created by users from
a forum I belong to. I’m trying to make it so users can follow other
users to keep track of what they’re up to (sort of like Twitter if you
know how that works).

Currently I’m working on the page that displays the users that follow
a certain user, I can easily do the reverse of this (see what users a
certain user is follow, user.friends) but I can’t do it the other way.

Don’t you just create another habtm which uses the same join table but
with the :foreign_key and :associated_foreign_key options swapped
round ?

Fred

Wow, that was surprisingly simple.

Thanks,
Tony

On Sep 1, 5:34 pm, Frederick C. [email protected]