Skip to content
Browse files

Revert usage of safe constantize

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
1 parent 6c367a0 commit c134f24f8fafe6bf2b9378706655d4d5181d5e3c @josevalim josevalim committed Jan 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 actionpack/lib/action_view/test_case.rb
View
4 actionpack/lib/action_view/test_case.rb
@@ -59,8 +59,10 @@ def tests(helper_class)
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)

0 comments on commit c134f24

Please sign in to comment.
Something went wrong with that request. Please try again.