My routes.rb is something like
However, when a url request likes
My intension is to call
:controller => ‘user’
:action => ‘category’
:id => ‘a/b’
However, :id has slash in it (a/b) will make rails fail to route.
(apache fail, webrick works fine somehow)
It seems like rails will try to match route rule with
I know one solution is to call CGI.escape in link_to or url_for , like
link_to :controller => ‘user’, :action => ‘category’, :id => CGI.escape
and unescape when I got it.
category = CGI.unescape(params[:category])
Any better solution ?