Filter query results from URL hash

Hi,

I'm developing a very simple product catalogue. Different product types and categories for each type.

I'd like to filter the results on my browse controller based on the values that have been appended to the URL.

for example

http://www.shop.com/cataloge/browse would display all products http://www.shop.com/catalogue/browse/?type=NewBook would display all NewBooks. http://www.shop.com/catalogue/browse/?type=UsedBook?used_book_category_id=4 would display all UsedBooks in used_book_category 4.

etc.

at the moment in the catalogue_controller.rb I'm trying

def browse   @products = Product.find(:all, :conditions => params[:product] end

how would I get the values from the url loaded into the params[:product] variable? And am I correct in thinking that it will then pick up the params declared in the URL and automatically filter the Products according to the criteria.

I think this can be done, saving a lot of hassle in the long term. Any help would be really appreciated.

Philip