aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel')
-rw-r--r--lib/arel/crud.rb4
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