Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

…tize

use safe_constantize instead constantize in AC::TestCase
  • Loading branch information...
commit 9c6d4801d1a2ef026feb2d122b7b10930d617476 2 parents daca35c + 0eb80fa
@josevalim josevalim authored
Showing with 1 addition and 3 deletions.
  1. +1 −3 actionpack/lib/action_controller/test_case.rb
View
4 actionpack/lib/action_controller/test_case.rb
@@ -364,9 +364,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)
Please sign in to comment.
Something went wrong with that request. Please try again.