This project is archived and is in readonly mode.

#1188 ✓resolved
Tom Stuart

Allow use of :path_prefix and :name_prefix outside of namespaced routes

Reported by Tom Stuart | October 8th, 2008 @ 09:40 AM | in 2.x

The :path_prefix and :name_prefix options are supported almost correctly on all routes, but they are only removed from the options hash in divide_route_options if the :namespace option is set, which interferes with route generation (i.e. the :path_prefix must be supplied in order for the route to match).

This is a shame since it would be convenient to use with_options to supply a common :path_prefix to a bunch of routes.

Attached is a tiny patch to always discard the :path_prefix and :name_prefix options, not just when a namespace is in effect.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Referenced by

Pages