From 422cba934c218c7725c115615d942344aa067aba Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Sun, 21 May 2006 15:11:00 +0000 Subject: Strip out leading schema name in classify. References #5139. [schoenm@earthlink.net] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4350 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activesupport/lib/active_support/inflector.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/inflector.rb b/activesupport/lib/active_support/inflector.rb index ce36d3ef54..54b9e064ac 100644 --- a/activesupport/lib/active_support/inflector.rb +++ b/activesupport/lib/active_support/inflector.rb @@ -146,7 +146,8 @@ module Inflector end def classify(table_name) - camelize(singularize(table_name)) + # strip out any leading schema name + camelize(singularize(table_name.sub(/.*\./, ''))) end def foreign_key(class_name, separate_class_name_and_id_with_underscore = true) -- cgit v1.2.3