aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorwycats <wycats@gmail.com>2010-04-11 14:53:17 -0700
committerwycats <wycats@gmail.com>2010-04-11 14:53:17 -0700
commit803df08d896b82ae3e86c9c1e3c2ea4b6826ef70 (patch)
treeb813371e844a9a05ba33beb6582335d3617f66ee /actionpack/lib/action_dispatch/routing/mapper.rb
parent76e0a9eb5b5ad17d51dad5e4e8c5ea1ed504ea88 (diff)
parent1f80b8b04f9783ea7a5f39bd7ce27248bc57a851 (diff)
downloadrails-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/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb8
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)