From 05eda21c4164e394fbb21f705408011ddeb37d56 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Wed, 9 Apr 2014 11:06:31 -0700 Subject: add a compile method for some backwards compatibility --- lib/arel/visitors/to_sql.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/arel') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index cba289c35c..fd1332a4db 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -65,6 +65,10 @@ module Arel @quoted_columns = {} end + def compile node, &block + accept(node, Arel::Collectors::SQLString.new, &block).value + end + private def visit_Arel_Nodes_DeleteStatement o, collector -- cgit v1.2.3