Browse files

Drop the trailing slash

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7150 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent f6a91b7 commit 8a207f6f22e90e8fe58fb940a93646129bcad60f @dhh dhh committed Jun 28, 2007
Showing with 1 addition and 0 deletions.
  1. +1 −0 railties/lib/tasks/routes.rake
View
1 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

0 comments on commit 8a207f6

Please sign in to comment.