diff options
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 2 | ||||
-rw-r--r-- | test/support/fake_record.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 3f61842c3f..506b33f4b6 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -171,7 +171,7 @@ module Arel end def table_exists? name - schema_cache.table_exists? name + schema_cache.data_source_exists?(name) end def column_for attr diff --git a/test/support/fake_record.rb b/test/support/fake_record.rb index 035a7a46cf..3d4c7d5630 100644 --- a/test/support/fake_record.rb +++ b/test/support/fake_record.rb @@ -39,7 +39,7 @@ module FakeRecord @primary_keys[name.to_s] end - def table_exists? name + def data_source_exists? name @tables.include? name.to_s end |