I am using Rails 1.2.6
i have an items controller.
i am using the templated index.rhtml so it displays everything in my
each item has the following fields in database.
category which is non unique
what i need is let say there is a drop down list in the index.rhtml
which contains all the possible values of category in the items table.
(I have managed this.)
inside this drop down list it contains say 3 possible values of
category and the value ‘ALL’
when a user chooses the value in the drop down, i need the items that
are displayed in this index.rhtml to change accordingly.
Eg, if the user chooses the category ‘household’
the page will only display items whose category is of the value
if the user chooses ‘ALL’
the page will display all.
I am open to either ajax or a full postback. Please advise me as to
how to get the effect I want.