aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosé Valim <jose.valim@gmail.com>2010-06-07 11:20:54 +0200
committerJosé Valim <jose.valim@gmail.com>2010-06-07 11:20:54 +0200
commit1a8f784a236058101c6e8b6387aefc96e86a1e54 (patch)
tree68bedf69383ab151a7020ab2291bad2392ba48c2
parent634c9310e302aba0c113363ccec748460113b523 (diff)
downloadrails-1a8f784a236058101c6e8b6387aefc96e86a1e54.tar.gz
rails-1a8f784a236058101c6e8b6387aefc96e86a1e54.tar.bz2
rails-1a8f784a236058101c6e8b6387aefc96e86a1e54.zip
member on resource should not expect an ID.
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
-rw-r--r--actionpack/test/dispatch/routing_test.rb5
2 files changed, 3 insertions, 6 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 63c553dd07..ae4417b56c 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -635,9 +635,7 @@ module ActionDispatch
end
when :resource
with_scope_level(:member) do
- scope(':id', :as => "") do
- yield
- end
+ yield
end
end
end
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb
index b2b8aca9b2..ffa4f50b00 100644
--- a/actionpack/test/dispatch/routing_test.rb
+++ b/actionpack/test/dispatch/routing_test.rb
@@ -358,10 +358,9 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest
def test_member_on_resource
with_test_routes do
- get '/session/1/crush'
+ get '/session/crush'
assert_equal 'sessions#crush', @response.body
-
- assert_equal '/session/1/crush', crush_session_path(1)
+ assert_equal '/session/crush', crush_session_path
end
end