1st of all, my english is bad, and i’m new to RoR, so accept my
apologies from start.
I need two combo-boxes populated from two tables that will act as
filters for a product list. I’ve already read some examples and
tutorials, but it seems that I’m still stuck in the problem.
the Controller for Products is called admin_product. the list method
takes all the products from the db_table called products and displays
the trick is to have two combo-boxes, 1st populated with the
parent_category_name from the parent_categories table, and the second
populated with category_name from the categories table. the default
value in the combo-boxes should be “- Select a parent category -” and "
- Select a category -".
When a option from the combo boxes is selected, the page should reload,
displaying only the products that have the parent_category_id or the
category_id that was selected. and also, if a parent_category is
selected, the second combo box shoul display only the categories with
the parent_category_id that was selected in the first combo-box. I think
that the ajax example with state/county/city it’s not suitable, beacause
the products list might be paginated. If I’m wrong please correct me.
Thank you for spendig this much time reading all this stuff and also for
any hints and code snippets that I can use.
All my respect,