diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 01:55:59 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-17 01:55:59 +0000 |
commit | ead404ccd0f8e384409835ec4c5b770c06c1e178 (patch) | |
tree | 4e02ea5776eeceb15dc8e778d81c468a60dbd4e4 | |
parent | 29066036f2c061d9aab1ab1dc2423e01626959c2 (diff) | |
download | rails-ead404ccd0f8e384409835ec4c5b770c06c1e178.tar.gz rails-ead404ccd0f8e384409835ec4c5b770c06c1e178.tar.bz2 rails-ead404ccd0f8e384409835ec4c5b770c06c1e178.zip |
Forget defaults :action if :controller changed at all
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@641 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-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 07c68e3574..7ea8f5be5e 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -224,7 +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] + defaults.delete(:action) if options.key?(:controller) end else options[:controller] = defaults[:controller] @@ -256,6 +256,6 @@ module ActionController end Routes = RouteSet.new - #Routes.reload # Do this here, so that server will die on load if SyntaxError or whatnot. + Routes.reload # Server will die on load if SyntaxError end end
\ No newline at end of file |