Topic: Using partials with parameters?
I currently have a view that uses tabs to "filter" based on a single column of my model. If we took the Product model as an example, each tab would be for a certain category. I also made an action in my controller to get all the objects for one specific category.
I then made a partial that renders a table with one row for each of the products.
How do I stitch the pieces together, in order to actually render these partials in my view? Because I use these tabs, each of the categories is in fact still on one page: <div id="category1">...</div><div id="category2">...</div> and so on
- the view is current index_by_category.html.erb
- the controller action in products_controller is also index_by_category
- the partial i did not yet create, but it's the same one I already use to show ALL items except that it obviously doesn't have a category column