diff options
author | wycats <wycats@gmail.com> | 2010-04-11 14:53:17 -0700 |
---|---|---|
committer | wycats <wycats@gmail.com> | 2010-04-11 14:53:17 -0700 |
commit | 803df08d896b82ae3e86c9c1e3c2ea4b6826ef70 (patch) | |
tree | b813371e844a9a05ba33beb6582335d3617f66ee /actionpack/lib/action_dispatch | |
parent | 76e0a9eb5b5ad17d51dad5e4e8c5ea1ed504ea88 (diff) | |
parent | 1f80b8b04f9783ea7a5f39bd7ce27248bc57a851 (diff) | |
download | rails-803df08d896b82ae3e86c9c1e3c2ea4b6826ef70.tar.gz rails-803df08d896b82ae3e86c9c1e3c2ea4b6826ef70.tar.bz2 rails-803df08d896b82ae3e86c9c1e3c2ea4b6826ef70.zip |
Merge branch 'master' of github.com:rails/rails
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 7035e360ec..3e15caee2d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -55,6 +55,14 @@ module ActionDispatch path = args.first end + if @scope[:module] && options[:to] + if options[:to].to_s.include?("#") + options[:to] = "#{@scope[:module]}/#{options[:to]}" + elsif @scope[:controller].nil? + options[:to] = "#{@scope[:module]}##{options[:to]}" + end + end + path = normalize_path(path) if using_match_shorthand?(path, options) |