Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Revert usage of safe constantize

Signed-off-by: José Valim <jose.valim@gmail.com>
  • Loading branch information...
commit c134f24f8fafe6bf2b9378706655d4d5181d5e3c 1 parent 6c367a0
@josevalim josevalim authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.