aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib')
-rw-r--r--activesupport/lib/active_support/inflector.rb3
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)