From 9a6fc9a540cd23af3ca061cb7406a6cdd5ad4294 Mon Sep 17 00:00:00 2001 From: Andrew White Date: Sat, 26 Jun 2010 08:15:33 +0100 Subject: Don't force pluralization of controller name when defining a resource [#4980 state:resolved] MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: José Valim --- actionpack/test/dispatch/routing_test.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 68e3dd6de3..8881838aef 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -318,6 +318,8 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + resources :content + match '/:locale/*file.:format', :to => 'files#show', :file => /path\/to\/existing\/file/ end end @@ -1457,6 +1459,13 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest end end + def test_resources_controller_name_is_not_pluralized + with_test_routes do + get '/content' + assert_equal 'content#index', @response.body + end + end + private def with_test_routes yield -- cgit v1.2.3