views:

184

answers:

1

Hi. I'm trying do something like this:

map.goto '/g/*extra', :controller => 'goto', :action => :show

Where extra is a path component, e.g.:

redirect_to goto_url( employee_path(employee) )

What I get is:

http:://www.example.com/g/%2Femployee%2F123

What I want is:

http:://www.example.com/g/employee/123

So my question is: although all of this works fine, is there any way to suppress parameter escaping for Rails route params, particularly a globbed param?

A: 

The url helper for a globbed route like that takes an array of path components, so you'll probably be able to get around that by doing goto_url( employee_path(employee).split('/') )

mckeed
Thanks! , goto_url + employee_path(...) - but both of these approaches look wrong to me, so I'm hoping something more like:map.goto '/g/*extra', :controller => 'goto, :action => :show, :escape => false
Eric