Topic: problems using acts_as_tree and HABTM together
I've started builing just looked at acts_as_tree for a category tree structure for browse the store. I managed to successfully create a collapsable menu using this which is all good. Now to link products to categories using the HABTM relationship.
This is where I have come unstuck, what should be seemingly easy has 'I think' been complicated by acts_as_tree since I want to view the products in a particular category but no matter what category id I do a find on products for I end up with a full list of products for that category and all others. I imagine that when for products for a particular category the query then recurses the category tree, up and down and returns all products. How annoying?
Has anyone else seen this and offer any suggestions as how to acheive what I want to do? I guess ideally there would be a way of limiting the depth of the recursion.