diff options
author | Marcel Molina <marcel@vernix.org> | 2006-05-21 15:11:00 +0000 |
---|---|---|
committer | Marcel Molina <marcel@vernix.org> | 2006-05-21 15:11:00 +0000 |
commit | 422cba934c218c7725c115615d942344aa067aba (patch) | |
tree | c82326373437e4804ab9dc716a75b9d0d082e510 /activesupport/lib | |
parent | 04fb7c30e36432602c849409c020da8f5bcfe9aa (diff) | |
download | rails-422cba934c218c7725c115615d942344aa067aba.tar.gz rails-422cba934c218c7725c115615d942344aa067aba.tar.bz2 rails-422cba934c218c7725c115615d942344aa067aba.zip |
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
Diffstat (limited to 'activesupport/lib')
-rw-r--r-- | activesupport/lib/active_support/inflector.rb | 3 |
1 files changed, 2 insertions, 1 deletions
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) |