aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/url_rewriter.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/url_rewriter.rb')
-rw-r--r--actionpack/lib/action_controller/url_rewriter.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb
index 1ff172e8ad..7bf9015b37 100644
--- a/actionpack/lib/action_controller/url_rewriter.rb
+++ b/actionpack/lib/action_controller/url_rewriter.rb
@@ -49,7 +49,7 @@ module ActionController
def rewrite_path(path, options)
include_id_in_path_params(options)
-
+
path = rewrite_action(path, options) if options[:action] || options[:action_prefix]
path = rewrite_path_params(path, options) if options[:path_params]
path = rewrite_controller(path, options) if options[:controller] || options[:controller_prefix]
@@ -86,7 +86,7 @@ module ActionController
# don't tell action_name about our little boo-boo
path = path.sub(action_prefix, action_name(options, nil))
elsif action_prefix && !action_prefix.empty?
- path = path.sub(action_prefix, action_name(options, action_prefix))
+ path = path.sub(%r(/#{action_prefix}/?), "/" + action_name(options, action_prefix))
else
path = path.sub(%r(#{@controller}/?$), @controller + "/" + action_name(options)) # " ruby-mode
end