From 2b20a488519716be15fbe351f7da39c9fd70f846 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Tue, 21 Sep 2010 09:20:14 -0700 Subject: making stuff work on mysql --- lib/arel/crud.rb | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) (limited to 'lib/arel/crud.rb') diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index e060a82941..640189fbe9 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -13,16 +13,9 @@ module Arel end um.table relation um.set values - - if @head.orders.empty? && @head.limit.nil? - um.wheres = @ctx.wheres - else - head = @head.clone - core = head.cores.first - core.projections = [relation.primary_key] - - um.wheres = [Nodes::In.new(relation.primary_key, [head])] - end + um.take @head.limit + um.order(*@head.orders) + um.wheres = @ctx.wheres @engine.connection.update um.to_sql, 'AREL' end -- cgit v1.2.3