diff options
Diffstat (limited to 'railties')
-rw-r--r-- | railties/lib/rails/application.rb | 2 | ||||
-rw-r--r-- | railties/test/rails_info_controller_test.rb | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/railties/lib/rails/application.rb b/railties/lib/rails/application.rb index 67094392ee..a74550b302 100644 --- a/railties/lib/rails/application.rb +++ b/railties/lib/rails/application.rb @@ -48,7 +48,7 @@ module Rails end def routes - ::ActionDispatch::Routing::Routes + @routes ||= ActionDispatch::Routing::RouteSet.new end def railties diff --git a/railties/test/rails_info_controller_test.rb b/railties/test/rails_info_controller_test.rb index a6fc23d95b..017e51326c 100644 --- a/railties/test/rails_info_controller_test.rb +++ b/railties/test/rails_info_controller_test.rb @@ -18,6 +18,9 @@ class InfoControllerTest < ActionController::TestCase match ':controller/:action' end @controller.stubs(:consider_all_requests_local? => false, :local_request? => true) + @router = Rails.application.routes + + Rails::InfoController.send(:include, @router.named_url_helpers) end test "info controller does not allow remote requests" do |