From 79411322ae225289e1c051f4f68ed84c6349e4a0 Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Mon, 8 Aug 2011 23:23:51 +0100 Subject: Make it the responsibility of the connection to hold on to a visitor for generating SQL, rather than the TreeManager. (There is a related commit coming in Active Record.) --- lib/arel/nodes/node.rb | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'lib/arel/nodes') diff --git a/lib/arel/nodes/node.rb b/lib/arel/nodes/node.rb index 1a5bc27856..4faace3782 100644 --- a/lib/arel/nodes/node.rb +++ b/lib/arel/nodes/node.rb @@ -32,8 +32,7 @@ module Arel # # Maybe we should just use `Table.engine`? :'( def to_sql engine = Table.engine - viz = Visitors.for engine - viz.accept self + engine.connection.visitor.accept self end # Iterate through AST, nodes will be yielded depth-first -- cgit v1.2.3