diff options
author | Hugo Peixoto <hugo.peixoto@gmail.com> | 2011-03-06 10:28:46 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-21 14:52:55 -0700 |
commit | 856fd75c9b6defb7711f93e6ecda2932e98c4113 (patch) | |
tree | ca47e76e39a6ae135793136e00bfda3f304efe8c /lib/arel/visitors | |
parent | d13ae3d51b32bfda31ebfee5230122f8fdb3a343 (diff) | |
download | rails-856fd75c9b6defb7711f93e6ecda2932e98c4113.tar.gz rails-856fd75c9b6defb7711f93e6ecda2932e98c4113.tar.bz2 rails-856fd75c9b6defb7711f93e6ecda2932e98c4113.zip |
Fixes rails bug #6058.
Propagates 'where' clauses when subquerying is triggered on the UpdateManager.
Diffstat (limited to 'lib/arel/visitors')
-rw-r--r-- | lib/arel/visitors/to_sql.rb | 1 |
1 files changed, 1 insertions, 0 deletions
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 |