aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/builder.rb
diff options
context:
space:
mode:
authorTekin Suleyman <tekin@tekin.co.uk>2009-03-10 15:26:59 +0000
committerTekin Suleyman <tekin@tekin.co.uk>2009-03-10 15:26:59 +0000
commitf1e903aa92f9e4913f3a34135e2dee43bd0cb0c1 (patch)
treebc3ead9f6c1a703649fb06d4c6e83e5e220a8bfe /actionpack/lib/action_controller/routing/builder.rb
parent7fa0a8d7f38a42d2f41a3f4aefc129d7071b0258 (diff)
parent5739626031b4d938652e5d5b84b20620dcbf6fde (diff)
downloadrails-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.rb3
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)