Forum: Ruby on Rails model.find with two associations

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Ryan Wallace (Guest)
on 2007-08-01 19:01
(Received via mailing list)

I would like to know the rails way to do the following:

If I have an Item model which has_many :tags, :through => item_tags
how can I find all items which are tagged with both a "ruby" and
"rails" tag. Also I would like to find all items tagged with either
"ruby" or "rails". What is the best way to do these queries?

This topic is locked and can not be replied to.