diff options
author | Jamis Buck <jamis@37signals.com> | 2006-06-06 19:09:56 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2006-06-06 19:09:56 +0000 |
commit | 4e3543b46749a83e4ccf1e9346b4dfe6d1a03233 (patch) | |
tree | 62319fd9667532ebef079a7cf8e3afabf61cc90a /actionpack/lib/action_controller | |
parent | e768dc694d917cb2e1f88839a8a616fae7f7719d (diff) | |
download | rails-4e3543b46749a83e4ccf1e9346b4dfe6d1a03233.tar.gz rails-4e3543b46749a83e4ccf1e9346b4dfe6d1a03233.tar.bz2 rails-4e3543b46749a83e4ccf1e9346b4dfe6d1a03233.zip |
Make sure named routes are never generated relative to some containing module
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4442 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index a878e606ec..70c864646d 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -111,7 +111,7 @@ module ActionController args = "options, hash, expire_on = {}" # Nest the body inside of a def block, and then compile it. - method_decl = "def generate_raw(#{args})\path = begin\n#{body}\nend\n[path, hash]\nend" + method_decl = "def generate_raw(#{args})\npath = begin\n#{body}\nend\n[path, hash]\nend" # puts "\n======================" # puts # p self @@ -971,7 +971,7 @@ module ActionController # current controller module, if any. In other words, if we're currently # on admin/get, and the new controller is 'set', the new controller # should really be admin/set. - if expire_on[:controller] && options[:controller] && options[:controller][0] != ?/ + if !named_route && expire_on[:controller] && options[:controller] && options[:controller][0] != ?/ old_parts = recall[:controller].split('/') new_parts = options[:controller].split('/') parts = old_parts[0..-(new_parts.length + 1)] + new_parts |