diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-28 18:44:08 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2007-06-28 18:44:08 +0000 |
commit | 8a207f6f22e90e8fe58fb940a93646129bcad60f (patch) | |
tree | 6208bac9d8fe56a9c5cb5c54fc0eb4458ab2ef7a | |
parent | f6a91b7b4ce2a7767392dfd3414a098047205c10 (diff) | |
download | rails-8a207f6f22e90e8fe58fb940a93646129bcad60f.tar.gz rails-8a207f6f22e90e8fe58fb940a93646129bcad60f.tar.bz2 rails-8a207f6f22e90e8fe58fb940a93646129bcad60f.zip |
Drop the trailing slash
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
-rw-r--r-- | railties/lib/tasks/routes.rake | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/railties/lib/tasks/routes.rake b/railties/lib/tasks/routes.rake index bb9971b717..39b7139167 100644 --- a/railties/lib/tasks/routes.rake +++ b/railties/lib/tasks/routes.rake @@ -4,6 +4,7 @@ task :routes => :environment do name = ActionController::Routing::Routes.named_routes.routes.index(route).to_s verb = route.conditions[:method].to_s.upcase segs = route.segments.inject("") { |str,s| str << s.to_s } + segs.chop! if segs.length > 1 reqs = route.requirements.empty? ? "" : route.requirements.inspect {:name => name, :verb => verb, :segs => segs, :reqs => reqs} end |