I have the following model setup - a User is interested in projects in many project Categories. Each Project has many categories. Like so:
class User
has_many :projects
has_and_belongs_to_many :project_categories
class Project
belongs_to :user
has_and_belongs_to_many :project_categories
class ProjectCategory
has_and_belongs_to_many :projects
has_and_belongs_to_many :users
Now, I'd like to do a find for projects with any of the catogories that a certain user are interested in, i.e. if a user is interested in project categories A,B,C then I'd like to find projects which are part of one or more of those project categories.
Anyone?