Skip to content

Commit a581a1d

Browse files
robertwahleraeden
authored andcommitted
fix for undefined method tables_with_views_included
The original tables method includes views already. The method tables_with_views_included was only definded in the PostgreSQL adapter
1 parent 2e24536 commit a581a1d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/rails_sql_views/connection_adapters/abstract_adapter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,11 @@ def supports_views?
1111
end
1212

1313
def disable_referential_integrity_with_views_excluded(&block)
14+
self.class.send(:alias_method, :original_tables_method, :tables)
1415
self.class.send(:alias_method, :tables, :base_tables)
1516
disable_referential_integrity_without_views_excluded(&block)
1617
ensure
17-
self.class.send(:alias_method, :tables, :tables_with_views_included)
18+
self.class.send(:alias_method, :tables, :original_tables_method)
1819
end
1920

2021
def supports_view_columns_definition?

0 commit comments

Comments
 (0)