From 641ea6925790771acb6e91b73f9efa6ded834761 Mon Sep 17 00:00:00 2001 From: Luiz Felipe Date: Mon, 17 Sep 2012 11:13:45 -0300 Subject: Removing to_shorthand from default_controller_and_action. Fixes #6497 When using shortcut routes inside an engine the "to_shorthand" variable is set to true, causing the module scope of the route to not be applied. --- actionpack/test/dispatch/routing_test.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'actionpack/test') diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 856248e2ac..4e83ad16d7 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -363,6 +363,7 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest resources :errors, :shallow => true do resources :notices end + get 'api/version' end scope :path => 'api' do @@ -1280,6 +1281,12 @@ class TestRoutingMapper < ActionDispatch::IntegrationTest assert_equal 'account#shorthand', @response.body end + def test_match_shorthand_with_module + assert_equal '/api/version', api_version_path + get '/api/version' + assert_equal 'api/api#version', @response.body + end + def test_dynamically_generated_helpers_on_collection_do_not_clobber_resources_url_helper assert_equal '/replies', replies_path end -- cgit v1.2.3