mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #3114 from zenprogrammer/fix_constantize_doc
Minor doc fix to String#constantize
This commit is contained in:
commit
8bde477e9d
1 changed files with 3 additions and 3 deletions
|
@ -36,9 +36,9 @@ class String
|
|||
# or is not initialized. See ActiveSupport::Inflector.constantize
|
||||
#
|
||||
# Examples
|
||||
# "Module".constantize # => Module
|
||||
# "Class".constantize # => Class
|
||||
# "blargle".safe_constantize # => NameError: wrong constant name blargle
|
||||
# "Module".constantize # => Module
|
||||
# "Class".constantize # => Class
|
||||
# "blargle".constantize # => NameError: wrong constant name blargle
|
||||
def constantize
|
||||
ActiveSupport::Inflector.constantize(self)
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue