diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 01:46:29 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 01:46:29 +0000 |
commit | 29066036f2c061d9aab1ab1dc2423e01626959c2 (patch) | |
tree | 574eb7d7540b1d090b11cb9f5f7a3b8f94421a56 /actionpack/lib | |
parent | c00bf5f0c62f72f84629c6873791a591c02ae62c (diff) | |
download | rails-29066036f2c061d9aab1ab1dc2423e01626959c2.tar.gz rails-29066036f2c061d9aab1ab1dc2423e01626959c2.tar.bz2 rails-29066036f2c061d9aab1ab1dc2423e01626959c2.zip |
Make Routes drop the default for action when the controller changes #651
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@640 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index 39ce487e62..07c68e3574 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -224,6 +224,7 @@ module ActionController else relative_to = defaults[:controller] ? defaults[:controller].split('/')[0..-2].join('/') : '' options[:controller] = relative_to.empty? ? options[:controller] : "#{relative_to}/#{options[:controller]}" + defaults.delete(:action) unless options[:controller] == defaults[:controller] end else options[:controller] = defaults[:controller] |