Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#1188

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.

Reported by Tom Stuart · October 8th, 2008 @ 09:40 AM

State: resolved
Milestone: 2.x
Assigned to: Pratik Pratik
Importance: none

Activity

  1. Pratik
    Pratik
    • Assigned user set to Pratik

    October 8th, 2008 @ 02:52 PM

  2. Repository
    Repository
    • State changed from new to resolved

    (from [e28ad77bba0574241e6eb64dfd0c1291b221effe]) Allow use of :path_prefix and :name_prefix outside of namespaced routes. [#1188 Allow use of :path_prefix and :name_prefix outside of namespaced routes state:resolved]

    Signed-off-by: Pratik Naik pratiknaik@gmail.com http://github.com/rails/rails/co...

    October 8th, 2008 @ 02:58 PM