diff options
author | Alexey Vakhov <vakhov@gmail.com> | 2011-10-03 10:01:52 +0400 |
---|---|---|
committer | Alexey Vakhov <vakhov@gmail.com> | 2011-10-03 10:04:14 +0400 |
commit | 0eb80fabdd46baaf06e27697cfbd2cd8900d7f67 (patch) | |
tree | 4d8a1e9c227ab6c57198e81f93d5f7398d63363c /actionpack/lib/action_controller | |
parent | d68884f4fddf5452f1dcbdf1a7b35d5889926fe5 (diff) | |
download | rails-0eb80fabdd46baaf06e27697cfbd2cd8900d7f67.tar.gz rails-0eb80fabdd46baaf06e27697cfbd2cd8900d7f67.tar.bz2 rails-0eb80fabdd46baaf06e27697cfbd2cd8900d7f67.zip |
use safe_constantize instead constantize in AC::TestCase
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/test_case.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/test_case.rb b/actionpack/lib/action_controller/test_case.rb index a83fa74795..343beae1bb 100644 --- a/actionpack/lib/action_controller/test_case.rb +++ b/actionpack/lib/action_controller/test_case.rb @@ -352,9 +352,7 @@ module ActionController end def determine_default_controller_class(name) - name.sub(/Test$/, '').constantize - rescue NameError - nil + name.sub(/Test$/, '').safe_constantize end def prepare_controller_class(new_class) |