diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-05 20:33:53 -0700 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2010-06-05 22:05:58 -0700 |
commit | fd1a5041362f5e65b813b7938d477143bd82de40 (patch) | |
tree | 5365eede7fe25b23d2a3f37beb21c11ddad281b0 /activesupport/lib/active_support/core_ext/string/inflections.rb | |
parent | 35ae42be4f9e23ae954e4705276b460998cb401b (diff) | |
download | rails-fd1a5041362f5e65b813b7938d477143bd82de40.tar.gz rails-fd1a5041362f5e65b813b7938d477143bd82de40.tar.bz2 rails-fd1a5041362f5e65b813b7938d477143bd82de40.zip |
ActiveSupport::Dependencies.constantize shortcut for caching named constant lookups
Diffstat (limited to 'activesupport/lib/active_support/core_ext/string/inflections.rb')
-rw-r--r-- | activesupport/lib/active_support/core_ext/string/inflections.rb | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/activesupport/lib/active_support/core_ext/string/inflections.rb b/activesupport/lib/active_support/core_ext/string/inflections.rb index 48b028bb64..ef479d559e 100644 --- a/activesupport/lib/active_support/core_ext/string/inflections.rb +++ b/activesupport/lib/active_support/core_ext/string/inflections.rb @@ -146,15 +146,4 @@ class String def foreign_key(separate_class_name_and_id_with_underscore = true) ActiveSupport::Inflector.foreign_key(self, separate_class_name_and_id_with_underscore) end - - # +constantize+ tries to find a declared constant with the name specified - # in the string. It raises a NameError when the name is not in CamelCase - # or is not initialized. - # - # Examples - # "Module".constantize # => Module - # "Class".constantize # => Class - def constantize - ActiveSupport::Inflector.constantize(self) - end end |