Forum: Ruby on Rails newbie trouble with find method and dual many-to-many relati

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Stan McFarland (Guest)
on 2006-02-03 22:12
(Received via mailing list)
Hi,

I'm trying to do something which I think is fairly simple, but I'm stuck
on the
syntax.  Briefly, I have three classes:  users, groups, and
blog_entries.
There's a M2M relationship between users and groups, and a M2M
relationship
between groups and blog_entries.

I've got my classes defined ok, but in my "list" method for the
blog_entries I
only want to list those blog_entries that belong to groups of which the
current
user is a member.  Assuming that the current_user is contained in the
@currentUser object, how can I write a graceful find command that will
only
return the records as stated above?

Thanks in advance,

Stan McFarland
This topic is locked and can not be replied to.