diff options
author | Tekin Suleyman <tekin@tekin.co.uk> | 2009-03-10 15:26:59 +0000 |
---|---|---|
committer | Tekin Suleyman <tekin@tekin.co.uk> | 2009-03-10 15:26:59 +0000 |
commit | f1e903aa92f9e4913f3a34135e2dee43bd0cb0c1 (patch) | |
tree | bc3ead9f6c1a703649fb06d4c6e83e5e220a8bfe /actionpack/lib/action_controller/routing/builder.rb | |
parent | 7fa0a8d7f38a42d2f41a3f4aefc129d7071b0258 (diff) | |
parent | 5739626031b4d938652e5d5b84b20620dcbf6fde (diff) | |
download | rails-f1e903aa92f9e4913f3a34135e2dee43bd0cb0c1.tar.gz rails-f1e903aa92f9e4913f3a34135e2dee43bd0cb0c1.tar.bz2 rails-f1e903aa92f9e4913f3a34135e2dee43bd0cb0c1.zip |
Merge branch 'master' of git://github.com/lifo/docrails
Diffstat (limited to 'actionpack/lib/action_controller/routing/builder.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing/builder.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/routing/builder.rb b/actionpack/lib/action_controller/routing/builder.rb index 44d759444a..d9590c88b8 100644 --- a/actionpack/lib/action_controller/routing/builder.rb +++ b/actionpack/lib/action_controller/routing/builder.rb @@ -159,7 +159,8 @@ module ActionController path = "/#{path}" unless path[0] == ?/ path = "#{path}/" unless path[-1] == ?/ - path = "/#{options[:path_prefix].to_s.gsub(/^\//,'')}#{path}" if options[:path_prefix] + prefix = options[:path_prefix].to_s.gsub(/^\//,'') + path = "/#{prefix}#{path}" unless prefix.blank? segments = segments_for_route_path(path) defaults, requirements, conditions = divide_route_options(segments, options) |