Permalink
Browse files

use safe_constantize instead constantize in AC::TestCase

  • Loading branch information...
1 parent d68884f commit 0eb80fabdd46baaf06e27697cfbd2cd8900d7f67 @avakhov avakhov committed Oct 3, 2011
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_controller/test_case.rb
@@ -352,9 +352,7 @@ def controller_class
end
def determine_default_controller_class(name)
- name.sub(/Test$/, '').constantize
- rescue NameError
- nil
+ name.sub(/Test$/, '').safe_constantize
end
def prepare_controller_class(new_class)

0 comments on commit 0eb80fa

Please sign in to comment.