collection_select

Hello,

I'm trying to use collection select to implement filtering for my page.
The idea is there are a bunch of posts and I want to implement record
filtering for those.

The first collection box would have parameters like "Date", "Amount",
"Category" and based on the selection of this a secondary drop down
would appear and allow the user to make a selection. The records on this
page would be then filtered based on both the selection.

I have been trying out many things and have googled a lot on collection
but I have reached a dead end now. I'm pretty new and just started
learning ROR.

You help is much appreciated here.

Thanks in advance.

Note: the code below might be wrong and as of now its not even
compiling.. currently it complaints of "remote_function" not defined...