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

Merge pull request #3193 from avakhov/patch-ac-test-case-safe-constantize

use safe_constantize instead constantize in AC::TestCase
This commit is contained in:
José Valim 2011-10-03 02:10:40 -07:00
commit 9c6d4801d1

View file

@ -364,9 +364,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)