I am stuck and I guess it is a syntax thing I just don't get:
It's a one(category)_to_many(product) relationship.
In my category model I have the columns pick1, pick2, pick3, pick4, pick5. Each of those holds the id of a product.
In my category_controller I want to retrieve those in a find:
@productpicks = Product.find(:all, :conditions =>
['online = ? and category_id IN (?)', true,
[@category.pick1, @category.pick2, @category.pick3, @category.pick4, @category.pick5]])
... and iterate over them in the view like this:
<% for product in @productpicks %>do something<% end %>
But there is nothing to be found in that array ...
Does anyone have an idea what I am doing wrong?
Thanks for helping!
Val