diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-15 00:51:02 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-02-15 00:51:02 +0000 |
commit | c844755e5a0c3d4edfcc78f9c30ef91fa0de550a (patch) | |
tree | 4cf4890fc5af5f58dd0a6a19c0a6fea6ed39a1df /activesupport/lib/core_ext/string/inflections.rb | |
parent | a3298e5efdf33398b49933323ea3fef7ff4e9a9c (diff) | |
download | rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.tar.gz rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.tar.bz2 rails-c844755e5a0c3d4edfcc78f9c30ef91fa0de550a.zip |
Merged back the Routing branch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@614 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activesupport/lib/core_ext/string/inflections.rb')
-rw-r--r-- | activesupport/lib/core_ext/string/inflections.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activesupport/lib/core_ext/string/inflections.rb b/activesupport/lib/core_ext/string/inflections.rb index 5d1070b00a..aa4ff3a74d 100644 --- a/activesupport/lib/core_ext/string/inflections.rb +++ b/activesupport/lib/core_ext/string/inflections.rb @@ -39,6 +39,10 @@ module ActiveSupport #:nodoc: def foreign_key(separate_class_name_and_id_with_underscore = true) Inflector.foreign_key(self, separate_class_name_and_id_with_underscore) end + + def constantize + Inflector.constantize(self) + end end end end |