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