diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/nodes/node.rb | 2 | ||||
-rw-r--r-- | lib/arel/visitors.rb | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/lib/arel/nodes/node.rb b/lib/arel/nodes/node.rb index 91c0a32573..43bad19488 100644 --- a/lib/arel/nodes/node.rb +++ b/lib/arel/nodes/node.rb @@ -22,7 +22,7 @@ module Arel # # Maybe we should just use `Table.engine`? :'( def to_sql engine = Table.engine - viz = Visitors::ToSql.new engine + viz = Visitors.for engine viz.accept self end end diff --git a/lib/arel/visitors.rb b/lib/arel/visitors.rb index deb4a4f991..557c3417a6 100644 --- a/lib/arel/visitors.rb +++ b/lib/arel/visitors.rb @@ -24,5 +24,6 @@ module Arel def self.visitor_for engine ENGINE_VISITORS[engine] end + class << self; alias :for :visitor_for; end end end |