From b1999be5a7efd67e2602c37ed898aa8433661863 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Tue, 15 Feb 2005 01:45:35 +0000 Subject: A hopefully more successful attempt at the Routing branch merge git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@617 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/core_ext/string/inflections.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activesupport/lib/core_ext/string/inflections.rb') 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 -- cgit v1.2.3