i have a catalog of products, i am using will paginator for paging the
results. now The user can sor the products by: name, price or
category, and can filter the products by category and ocation. For
doing this i have used link_to hepler like so:
link_to "Name", :action => :index, :orderby => "name"
link_to "Category", :action => :index, :orderby => "category_id"
link_to "Price", :action => :index, :orderby => "price"
for category in @categories
link_to category.name, :action => :index, :category => category.id
for ocation in @ocations
link_to ocation.name, :action => :index, :ocation => ocation.id
So, when the user click in the sort functionality, the URL will be any
And when the user click on the filter funtionality the URl will be
I am having problems because i do not know how to keep both parameters
on the url if the user click on one of the sort links anf one of the
ocation or category links. In this case what i want to have in my URL
Or if nothing has been selected, i wish for example:
http://www.something.com/gallery/page/4?category=&orderby= (in this
case i set defaults values for each parameter)
Any idea, suggestion?