On Feb 27, 2006, at 3:17 AM, J?rg wrote:
> Hi,
>
> I have a URL with encoded characters, I want them to be decoded.
> Is this possible in the routes.rb?
>
> e.g. decoding the @params[category]
>
> map.connect ''performances/:category'', :controller =>
> ''performance'', :action =>
''list_performances''
>
No, this is not possible. I think a before_filter in the
ApplicationController would be your best bet:
before_filter :decode_category
def decode_category
if params[:category]
params[:category] = CGI.unescape(params[:category])
end
end
Duane Johnson
(canadaduane)
http://blog.inquirylabs.com/