aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-02-20 20:54:40 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-02-20 20:54:40 +0000
commitf153f42469ff6d3791e25cdf095986909e679dde (patch)
treeda6ba4879402bca47552cc212944f148c427fa10 /actionpack/lib
parentd8739bd8cb17e9ee4d87fcd4ca6bd6122e90a191 (diff)
downloadrails-f153f42469ff6d3791e25cdf095986909e679dde.tar.gz
rails-f153f42469ff6d3791e25cdf095986909e679dde.tar.bz2
rails-f153f42469ff6d3791e25cdf095986909e679dde.zip
Never end generated paths with a '/' #683
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@717 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib')
-rw-r--r--actionpack/lib/action_controller/routing.rb2
-rw-r--r--actionpack/lib/action_controller/url_rewriter.rb4
2 files changed, 2 insertions, 4 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb
index acdb4635f0..18645ae4e0 100644
--- a/actionpack/lib/action_controller/routing.rb
+++ b/actionpack/lib/action_controller/routing.rb
@@ -74,8 +74,6 @@ module ActionController
end
components.collect! {|c| c.to_s}
- components.unshift(components.shift + '/') if components.length == 1 && @items.first == :controller # Add '/' to controllers
-
return components, unused
end
diff --git a/actionpack/lib/action_controller/url_rewriter.rb b/actionpack/lib/action_controller/url_rewriter.rb
index a1b1a2a57b..45263f40fe 100644
--- a/actionpack/lib/action_controller/url_rewriter.rb
+++ b/actionpack/lib/action_controller/url_rewriter.rb
@@ -42,7 +42,7 @@ module ActionController
RESERVED_OPTIONS.each {|k| options.delete k}
path, extras = Routing::Routes.generate(options, @request)
- path = "/#{path.join('/')}"
+ path = "/#{path.join('/')}".chomp '/'
path += build_query_string(extras)
return path
@@ -135,4 +135,4 @@ module ActionController
return query_string
end
end
-end \ No newline at end of file
+end