diff options
author | José Valim <jose.valim@gmail.com> | 2010-08-24 13:05:29 -0300 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-08-24 13:05:29 -0300 |
commit | 2916521da825d5a0b93eb1cb86f12946e9345e29 (patch) | |
tree | 89b05872fc1db6b850c3d4d65aa6af7ce6985b4a /actionpack/lib/action_dispatch/routing | |
parent | 4df19b3f27c93e0a3091c176536fa119ea03ebb7 (diff) | |
download | rails-2916521da825d5a0b93eb1cb86f12946e9345e29.tar.gz rails-2916521da825d5a0b93eb1cb86f12946e9345e29.tar.bz2 rails-2916521da825d5a0b93eb1cb86f12946e9345e29.zip |
Fix how routes inside namespaces are generated.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 76c7ec35b9..c83d714dbc 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -726,7 +726,7 @@ module ActionDispatch path = options.delete(:path) action = args.first - if action && action.to_s =~ /^[A-Za-z_]\w*$/ + if action.is_a?(Symbol) || (resource_method_scope? && action.to_s =~ /^[A-Za-z_]\w*$/) path = path_for_action(action, path) options[:action] ||= action options[:as] = name_for_action(action, options[:as]) |