From 3e7a4ecc57da31c908982f933de65d33ebbfc344 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 2 Jan 2005 20:10:11 +0000 Subject: Fixed redirects when the controller and action is named the same. Still haven't fixed same controller, module, and action, though #201 [Josh] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@321 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/lib/action_controller/url_rewriter.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_controller') diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb index a3ff8fac32..cb6baf2c13 100644 --- a/actionpack/lib/action_controller/url_rewriter.rb +++ b/actionpack/lib/action_controller/url_rewriter.rb @@ -91,7 +91,7 @@ module ActionController path = path.sub(%r(#{@controller}/?), @controller + "/" + action_name(options)) # " ruby-mode end else - path = path.sub((action_prefix || "") + @action + (action_suffix || ""), action_name(options, action_prefix)) + path = path.sub(@controller + "/" + (action_prefix || "") + @action + (action_suffix || ""), @controller + "/" + action_name(options, action_prefix)) end if options[:controller_prefix] && !options[:controller] -- cgit v1.2.3