aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2007-11-25 22:24:23 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2007-11-25 22:24:23 +0000
commit9e76b59c85d94148e20999a2943777cb1fe0bee9 (patch)
tree4ac3d9a00bbb186e860057c722b4953ae631fb23 /actionpack/lib/action_controller/routing.rb
parentf4b5ca1ff0113e41c974b7cbda1f734f9c0526fe (diff)
downloadrails-9e76b59c85d94148e20999a2943777cb1fe0bee9.tar.gz
rails-9e76b59c85d94148e20999a2943777cb1fe0bee9.tar.bz2
rails-9e76b59c85d94148e20999a2943777cb1fe0bee9.zip
Fixed that named routes living under resources shouldn't have double slashes (closes #10198) [isaacfeliu]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index 2e8951e36d..1b7eb74db1 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -1012,7 +1012,7 @@ module ActionController
path = "/#{path}" unless path[0] == ?/
path = "#{path}/" unless path[-1] == ?/
- path = "/#{options[:path_prefix]}#{path}" if options[:path_prefix]
+ path = "/#{options[:path_prefix].gsub(/^\//,'')}#{path}" if options[:path_prefix]
segments = segments_for_route_path(path)
defaults, requirements, conditions = divide_route_options(segments, options)