Passing a parameter in a method via URL

Hi there,

I want to pass a parameter with a method invoked from an .rthml file.
How can I do that?

The method is called list_by(category) and is located in an ordinary
.rhtml page. The category parameter changes depending on the context.
But it can never be invoked because URLs can’t display brackets. Do you
get what I mean? Can anybody help?

The method is called list_by(category) and is located in an ordinary
.rhtml page. The category parameter changes depending on the context.
But it can never be invoked because URLs can’t display brackets. Do you
get what I mean? Can anybody help?

is it a simple parameter or an hash?
AFAIK, you can’t pass an hash right now, you must encode it with
encode64 before:
http://lists.rubyonrails.org/pipermail/rails/2006-May/041867.html

If it’s a simple param, you can do something like that:
<%= link_to ‘<< Previous page’, { :page =>
@property_pages.current.previous, :category => params[:category] } if
@property_pages.current.previous %>