Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Merge pull request #4784 from semaperepelitsa/constantize

A little constantize update
  • Loading branch information...
commit 7bfdbeabd26f87d9e6bb6891d6c8dee36d1dfcb1 2 parents 049dc50 + 46fc0f2
@tenderlove tenderlove authored
View
2  actionpack/lib/action_controller/test_case.rb
@@ -351,7 +351,7 @@ module ClassMethods
def tests(controller_class)
case controller_class
when String, Symbol
- self.controller_class = "#{controller_class.to_s.underscore}_controller".camelize.constantize
+ self.controller_class = "#{controller_class.to_s.camelize}Controller".constantize
when Class
self.controller_class = controller_class
else
View
2  activesupport/lib/active_support/inflector/methods.rb
@@ -212,7 +212,7 @@ def constantize(camel_cased_word) #:nodoc:
constant = Object
names.each do |name|
- constant = constant.const_defined?(name, false) ? constant.const_get(name) : constant.const_missing(name)
+ constant = constant.const_get(name, false)
end
constant
end
Please sign in to comment.
Something went wrong with that request. Please try again.