From 856fd75c9b6defb7711f93e6ecda2932e98c4113 Mon Sep 17 00:00:00 2001 From: Hugo Peixoto Date: Sun, 6 Mar 2011 10:28:46 +0000 Subject: Fixes rails bug #6058. Propagates 'where' clauses when subquerying is triggered on the UpdateManager. --- lib/arel/visitors/to_sql.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/arel/visitors/to_sql.rb') diff --git a/lib/arel/visitors/to_sql.rb b/lib/arel/visitors/to_sql.rb index f30557e509..6bf5a3bb6b 100644 --- a/lib/arel/visitors/to_sql.rb +++ b/lib/arel/visitors/to_sql.rb @@ -35,6 +35,7 @@ module Arel stmt = Nodes::SelectStatement.new core = stmt.cores.first core.froms = o.relation + core.wheres = o.wheres core.projections = [key] stmt.limit = o.limit stmt.orders = o.orders -- cgit v1.2.3