Permalink
Browse files

only remove index when it comes from the symbol

  • Loading branch information...
1 parent 506ad54 commit 99b83140bef6a4d5a22d821eb57a0cea87fe35b2 @joshbuddy joshbuddy committed Aug 11, 2011
Showing with 1 addition and 2 deletions.
  1. +0 −1 padrino-core/lib/padrino-core/application/routing.rb
  2. +1 −1 padrino-core/test/test_routing.rb
@@ -586,7 +586,6 @@ def parse_route(path, options, verb)
path = "#{@_map}/#{path}".squeeze('/') unless absolute_map or @_map.blank?
# Small reformats
- path.gsub!(/(\/|^)index$/, '\\1') # Remove /index from path
path.gsub!(%r{/\?$}, '(/)') # Remove index path
path.gsub!(%r{//$}, '/') # Remove index path
path[0,0] = "/" unless path =~ %r{^\(?/} # Paths must start with a /
@@ -432,7 +432,7 @@ class TestRouting < Test::Unit::TestCase
get "/"
assert_equal "index", body
assert_equal "/", @app.url(:index)
- get "/accounts"
+ get "/accounts/index"
assert_equal "accounts", body
end

0 comments on commit 99b8314

Please sign in to comment.