1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

use safe_constantize instead constantize in AC::TestCase

This commit is contained in:
Alexey Vakhov 2011-10-03 10:01:52 +04:00
parent d68884f4fd
commit 0eb80fabdd

View file

@ -352,9 +352,7 @@ module ActionController
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)