怎么方便得通过url params来查找数据?

比如传进来的是:
http://localhost:3000/products?brand=1&class=2

我希望在controller里面:

@products = Product.find(:all, :conditions => ["brand_id=? AND class_id=?", params[:brand], parmas[:class]]

但是问题是,我不知道传进来的get request的params有哪些,比如可以
http://localhost:3000/products?brand=1
http://localhost:3000/products?class=2
甚至还有其他属性:
http://localhost:3000/products?brand=1&class=2&other_attr=x&........&

请问我怎么方便得查找到符合条件的product?代码怎么写?

谢谢!!

conditions可以是一个hash:
Product.find(:all, :conditions => params)