diff options
author | Piotr Sarnacki <drogus@gmail.com> | 2010-09-25 19:22:32 +0200 |
---|---|---|
committer | Piotr Sarnacki <drogus@gmail.com> | 2010-09-30 09:47:05 +0200 |
commit | 22b11a41cc764bc0f7b0c0f518a5289230428597 (patch) | |
tree | 572be184b738a046989c85ec2528b1ad4cd85370 /actionpack/lib/action_dispatch | |
parent | 74598fe7e9097484c4029e2731e462c6c82836f9 (diff) | |
download | rails-22b11a41cc764bc0f7b0c0f518a5289230428597.tar.gz rails-22b11a41cc764bc0f7b0c0f518a5289230428597.tar.bz2 rails-22b11a41cc764bc0f7b0c0f518a5289230428597.zip |
Allow mounting engines at '/'
Without that commit script_name always become '/', which
results in paths like //posts/1 instead of /posts/1
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 5d18dfe369..99a3019f3a 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -511,7 +511,7 @@ module ActionDispatch end script_name = options.delete(:script_name) - path = (script_name.blank? ? _generate_prefix(options) : script_name).to_s + path = (script_name.blank? ? _generate_prefix(options) : script_name.chomp('/')).to_s path_options = options.except(*RESERVED_OPTIONS) path_options = yield(path_options) if block_given? |