diff options
author | Akira Matsuda <ronnie@dio.jp> | 2019-05-01 13:33:38 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2019-05-01 13:33:38 +0900 |
commit | fef174f5c524edacbcad846d68400e7fe114a15a (patch) | |
tree | b9a972163771d226cb8111e4158f48f04cf426fc /actionview/lib/action_view | |
parent | 0c152f2eb419306578115da2c9fa10af575bede7 (diff) | |
download | rails-fef174f5c524edacbcad846d68400e7fe114a15a.tar.gz rails-fef174f5c524edacbcad846d68400e7fe114a15a.tar.bz2 rails-fef174f5c524edacbcad846d68400e7fe114a15a.zip |
`@controller` may not be defined here, and if so, it causes a Ruby warning
e.g. via test-unit-rails' `run_setup`
Diffstat (limited to 'actionview/lib/action_view')
-rw-r--r-- | actionview/lib/action_view/test_case.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/lib/action_view/test_case.rb b/actionview/lib/action_view/test_case.rb index e14f7aaec7..3a75633743 100644 --- a/actionview/lib/action_view/test_case.rb +++ b/actionview/lib/action_view/test_case.rb @@ -284,7 +284,7 @@ module ActionView def respond_to_missing?(name, include_private = false) begin - routes = @controller.respond_to?(:_routes) && @controller._routes + routes = defined?(@controller) && @controller.respond_to?(:_routes) && @controller._routes rescue # Don't call routes, if there is an error on _routes call end |