diff options
author | Tom Stuart <tom@experthuman.com> | 2008-10-08 09:31:00 +0100 |
---|---|---|
committer | Pratik Naik <pratiknaik@gmail.com> | 2008-10-08 14:56:52 +0100 |
commit | e28ad77bba0574241e6eb64dfd0c1291b221effe (patch) | |
tree | 7027fbe4cf1715ffdf816a6c78c0aed1c579b9cd /actionpack/lib/action_controller | |
parent | aec391621b6af7af1e0ba61c993bbdd88624eac3 (diff) | |
download | rails-e28ad77bba0574241e6eb64dfd0c1291b221effe.tar.gz rails-e28ad77bba0574241e6eb64dfd0c1291b221effe.tar.bz2 rails-e28ad77bba0574241e6eb64dfd0c1291b221effe.zip |
Allow use of :path_prefix and :name_prefix outside of namespaced routes. [#1188 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing/builder.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing/builder.rb b/actionpack/lib/action_controller/routing/builder.rb index 5704d9d01a..7b888fa8d2 100644 --- a/actionpack/lib/action_controller/routing/builder.rb +++ b/actionpack/lib/action_controller/routing/builder.rb @@ -60,12 +60,10 @@ module ActionController # segments are passed alongside in order to distinguish between default values # and requirements. def divide_route_options(segments, options) - options = options.dup + options = options.except(:path_prefix, :name_prefix) if options[:namespace] options[:controller] = "#{options.delete(:namespace).sub(/\/$/, '')}/#{options[:controller]}" - options.delete(:path_prefix) - options.delete(:name_prefix) end requirements = (options.delete(:requirements) || {}).dup |