Allowing users to reorder displayed data from a table

I have a list of names and prices from a database to display on a
webpage. I would like to allow the user to be able to display those
items either alphabetically or by price (decending or ascending.) I
would also like the user to be able to list items with a certain price
range of their choosing also. How can I do this in Rails?

Thanks!

Cheri wrote:

I have a list of names and prices from a database to display on a
webpage. I would like to allow the user to be able to display those
items either alphabetically or by price (decending or ascending.) I
would also like the user to be able to list items with a certain price
range of their choosing also. How can I do this in Rails?

Thanks!

Look for a helper called “sort_helper” - it works great for sorting on
column headings.

The price range will have to be coded into a find criteria. Do the
sort_helper first because you will have to modify the search/find code
after you implement it.

Regards,

Michael