I have Product model and it has many categories with a has_many :through association
In my controller I am trying to do a find by with categories.category but it comes up with a mysql error.
Model.find(:all, :conditions => ['categories.category_id = ?', @category.id ])
Ideas?
If you’re doing you’re
findon theProductmodel, you’re either going to need to remove thecategories.part of your:conditionsstatement, or add a:joins => :categroiesto your finder.Some more help would certainly narrow down the problem, however.