diff options
author | José Valim <jose.valim@gmail.com> | 2012-01-26 20:48:09 +0100 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2012-01-26 20:52:56 +0100 |
commit | c134f24f8fafe6bf2b9378706655d4d5181d5e3c (patch) | |
tree | 2530a4db04e63c4c072c29775d73ad94d098470e | |
parent | 6c367a0d787705746f262d0bd5ad8c4f13a8c809 (diff) | |
download | rails-c134f24f8fafe6bf2b9378706655d4d5181d5e3c.tar.gz rails-c134f24f8fafe6bf2b9378706655d4d5181d5e3c.tar.bz2 rails-c134f24f8fafe6bf2b9378706655d4d5181d5e3c.zip |
Revert usage of safe constantize
Signed-off-by: José Valim <jose.valim@gmail.com>
-rw-r--r-- | actionpack/lib/action_view/test_case.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/actionpack/lib/action_view/test_case.rb b/actionpack/lib/action_view/test_case.rb index 9ebe498192..98ce21ce1d 100644 --- a/actionpack/lib/action_view/test_case.rb +++ b/actionpack/lib/action_view/test_case.rb @@ -59,8 +59,10 @@ module ActionView end def determine_default_helper_class(name) - mod = name.sub(/Test$/, '').safe_constantize + mod = name.sub(/Test$/, '').constantize mod.is_a?(Class) ? nil : mod + rescue NameError + nil end def helper_method(*methods) |