Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add more cases to previous commit [#4394 state:resolved]

  • Loading branch information...
commit 5c9f27abaabba0d008ccd710ed1af5f6caa4e371 1 parent 4560385
@josevalim josevalim authored
View
2  actionpack/lib/action_dispatch/routing/mapper.rb
@@ -680,7 +680,7 @@ def nested
end
def namespace(path)
- if @scope[:scope_level] == :resources
+ if resource_scope?
nested { super }
else
super
View
11 actionpack/test/dispatch/routing_test.rb
@@ -146,7 +146,11 @@ def self.matches?(request)
resources :clients do
namespace :google do
- resource :account
+ resource :account do
+ namespace :secret do
+ resource :info
+ end
+ end
end
end
@@ -824,8 +828,11 @@ def test_namespace_nested_in_resources
with_test_routes do
get '/clients/1/google/account'
assert_equal '/clients/1/google/account', client_google_account_path(1)
-
assert_equal 'google/accounts#show', @response.body
+
+ get '/clients/1/google/account/secret/info'
+ assert_equal '/clients/1/google/account/secret/info', client_google_account_secret_info_path(1)
+ assert_equal 'google/secret/infos#show', @response.body
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.