Model.find with two associations


#1

Hi,

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?

Thanks,
Ryan