diff options
author | kennyj <kennyj@gmail.com> | 2012-02-10 21:20:55 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2012-02-10 21:20:55 +0900 |
commit | 203b88f99848454680ce5554b1cb38b6f4dee11b (patch) | |
tree | 52e02a07e7f8b30d0bc4054e9feea45dc7355614 /actionpack/test | |
parent | e6c98b83cbf4eab8944601754cc8d0e627b55d6f (diff) | |
download | rails-203b88f99848454680ce5554b1cb38b6f4dee11b.tar.gz rails-203b88f99848454680ce5554b1cb38b6f4dee11b.tar.bz2 rails-203b88f99848454680ce5554b1cb38b6f4dee11b.zip |
Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
Diffstat (limited to 'actionpack/test')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 1216193075..518d0333eb 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -2449,6 +2449,32 @@ class TestAppendingRoutes < ActionDispatch::IntegrationTest end end +class TestNamespaceWithControllerOption < ActionDispatch::IntegrationTest + module ::Admin + class StorageFilesController < ActionController::Base + def index + render :text => "admin/storage_files#index" + end + end + end + + DefaultScopeRoutes = ActionDispatch::Routing::RouteSet.new + DefaultScopeRoutes.draw do + namespace :admin do + resources :storage_files, :controller => "StorageFiles" + end + end + + def app + DefaultScopeRoutes + end + + def test_controller_options + get '/admin/storage_files' + assert_equal "admin/storage_files#index", @response.body + end +end + class TestDefaultScope < ActionDispatch::IntegrationTest module ::Blog class PostsController < ActionController::Base |