diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-08-11 08:38:47 +0100 |
---|---|---|
committer | Jon Leighton <j@jonathanleighton.com> | 2011-08-15 23:10:16 +0100 |
commit | 12aaad0848fb29bf64025043a855b0c0b497a6b8 (patch) | |
tree | badfa9a1b8d817266d472aaf171c15f9a5ca67bc /activerecord/lib/active_record/connection_adapters/abstract | |
parent | 8778c82e32690ed7b25664522d0bd0324ebea840 (diff) | |
download | rails-12aaad0848fb29bf64025043a855b0c0b497a6b8.tar.gz rails-12aaad0848fb29bf64025043a855b0c0b497a6b8.tar.bz2 rails-12aaad0848fb29bf64025043a855b0c0b497a6b8.zip |
use update.key instead of update.ast.key. make better use of select manager.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb index d8bd33f72a..bfbf953a37 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb @@ -311,9 +311,9 @@ module ActiveRecord # an UPDATE statement, so in the mysql adapters we redefine this to do that. def join_to_update(update, select) #:nodoc: subselect = select.ast.clone - subselect.cores.last.projections = [update.ast.key] + subselect.cores.last.projections = [update.key] - update.where update.ast.key.in(subselect) + update.where update.key.in(subselect) end protected |