Permalink
Browse files

Merge pull request #2831 from arunagw/pg_abstract_class_fix

Fixed test for 3-1-stable. Abstract class is having nil class name.
  • Loading branch information...
2 parents e491444 + 891d0d7 commit e835aa05d7d084243e86e4aeee3a8d9f60c9a961 @tenderlove tenderlove committed Sep 3, 2011
Showing with 1 addition and 0 deletions.
  1. +1 −0 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
View
1 activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -672,6 +672,7 @@ def tables(name = nil)
def table_exists?(name)
schema, table = extract_schema_and_table(name.to_s)
+ return false unless table # Abstract classes is having nil table name
binds = [[nil, table.gsub(/(^"|"$)/,'')]]
binds << [nil, schema] if schema

0 comments on commit e835aa0

Please sign in to comment.