diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-16 14:20:07 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2013-11-16 14:20:07 -0800 |
commit | aa14068100a968c6c616a525c287fbfaacc7d487 (patch) | |
tree | 3c5255d88a32cf72af0b438e6b38eec3a23e4c56 /lib | |
parent | ff8b3bcf7044288bb13e98208650f141e0460908 (diff) | |
download | rails-aa14068100a968c6c616a525c287fbfaacc7d487.tar.gz rails-aa14068100a968c6c616a525c287fbfaacc7d487.tar.bz2 rails-aa14068100a968c6c616a525c287fbfaacc7d487.zip |
explicitly pass the pk to compile_update
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/crud.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index ef14439a1f..6f4962cbfe 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -2,7 +2,7 @@ module Arel ### # FIXME hopefully we can remove this module Crud - def compile_update values + def compile_update values, pk um = UpdateManager.new @engine if Nodes::SqlLiteral === values @@ -10,7 +10,7 @@ module Arel else relation = values.first.first.relation end - um.key= relation.primary_key + um.key = pk um.table relation um.set values um.take @ast.limit.expr if @ast.limit |