Skip to content
This repository
Browse code

Revert usage of safe constantize

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit c134f24f8fafe6bf2b9378706655d4d5181d5e3c 1 parent 6c367a0
José Valim authored January 26, 2012

Showing 1 changed file with 3 additions and 1 deletion. Show diff stats Hide diff stats

  1. 4  actionpack/lib/action_view/test_case.rb
4  actionpack/lib/action_view/test_case.rb
@@ -59,8 +59,10 @@ def tests(helper_class)
59 59
         end
60 60
 
61 61
         def determine_default_helper_class(name)
62  
-          mod = name.sub(/Test$/, '').safe_constantize
  62
+          mod = name.sub(/Test$/, '').constantize
63 63
           mod.is_a?(Class) ? nil : mod
  64
+        rescue NameError
  65
+          nil
64 66
         end
65 67
 
66 68
         def helper_method(*methods)

0 notes on commit c134f24

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