From a98c9bdbdd233ff60457450deea80d2015ee1193 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Thu, 4 May 2017 15:13:58 -0700 Subject: Revert "Merge pull request #482 from kirs/multiple-insert" This reverts commit 6d105c7f891a14316eab47dfff3bf1b94f3204e7, reversing changes made to 437aa3a4bb8ad4f3f4eba299dbb1112852f9c7ac. This broke Active Record when the values are sql literals --- lib/arel/visitors/to_sql.rb | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'lib/arel/visitors') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index 7143d4e76a..486c51a183 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -131,7 +131,6 @@ module Arel end if o.values - collector << " VALUES" maybe_visit o.values, collector elsif o.select maybe_visit o.select, collector @@ -167,19 +166,8 @@ module Arel collector << "FALSE" end - def visit_Arel_Nodes_Tuple o, collector - len = o.values.length - 1 - o.values.each_with_index { |value, i| - collector = visit value, collector - unless i == len - collector << COMMA - end - } - collector - end - def visit_Arel_Nodes_Values o, collector - collector << "(" + collector << "VALUES (" len = o.expressions.length - 1 o.expressions.each_with_index { |value, i| -- cgit v1.2.3