From 214af496460c3639e8963c85834ee064f203cc6b Mon Sep 17 00:00:00 2001 From: Jean Boussier Date: Thu, 10 Apr 2014 10:08:37 -0400 Subject: Allow INSERT INTO SELECT queries --- lib/arel/visitors/to_sql.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'lib/arel/visitors') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index e1b46eb6e6..22f7943ab9 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -127,7 +127,13 @@ module Arel }.join ', '})" end - maybe_visit o.values, collector + if o.values + maybe_visit o.values, collector + elsif o.select + maybe_visit o.select, collector + else + collector + end end def visit_Arel_Nodes_Exists o, collector -- cgit v1.2.3