diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-08 23:23:51 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-08 23:23:51 +0100 |
commit | 79411322ae225289e1c051f4f68ed84c6349e4a0 (patch) | |
tree | 424499366dc9c7ced8a271756b86a865ce17c977 /lib/arel/nodes | |
parent | 03b6ca269ac8dfec8f70f2b98439d45b873f9e97 (diff) | |
download | rails-79411322ae225289e1c051f4f68ed84c6349e4a0.tar.gz rails-79411322ae225289e1c051f4f68ed84c6349e4a0.tar.bz2 rails-79411322ae225289e1c051f4f68ed84c6349e4a0.zip |
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.)
Diffstat (limited to 'lib/arel/nodes')
-rw-r--r-- | lib/arel/nodes/node.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 |