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:
parent
d68884f4fd
commit
0eb80fabdd
1 changed files with 1 additions and 3 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue