Having this route:
map.foo 'foo/*path', :controller => 'foo', :action => 'index'
I have the following results for the link_to call
link_to 'Foo', :controller => 'foo', :path => 'bar/baz' # <a href='/foo/bar%2Fbaz'>Foo</a>
Calling url_for or foo_url directly, even with :escape => false, give me the same url:
foo_url(:path => 'bar/baz', :escape => false, :only_path => true) # /foo/bar%2Fbaz
I want the resulting url to be: /foo/bar/baz
Is there a way around this without patching rails?
Instead of passing path a string, give it an array.
If you didn’t have the route in your routes file, this same link_to would instead create this:
The only place I could find this documented is in this ticket.