Newbie trouble with find method and dual many-to-many relati


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
There’s a M2M relationship between users and groups, and a M2M
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
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
return the records as stated above?

Thanks in advance,

Stan McFarland

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs