Permalink
Browse files

Revert usage of safe constantize

  • Loading branch information...
1 parent 5dab9bd commit e634efca99962fdbb83791a8daf9b0ceb9ff2f63 @josevalim josevalim committed Jan 26, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 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 e634efc

Please sign in to comment.