I think I'm approaching this the wrong way, which is why I can't seem to figure out an easy solution. I'm relatively new to Rails, so bear with me.
I have a layout, "store," that contains all of the common visual elements for the other controllers. In this layout, I need to dynamically create the sidebar with data from two models, Product and ProductFamily. I want it to output like so:
Product Family
---- Product1
---- Product2
And continue on through all relevant records.
I just can't figure out where to start writing the logic for this. Does it go in the layout? In a controller?
Please, point me in the right direction!