diff options
Diffstat (limited to 'lib/arel/crud.rb')
-rw-r--r-- | lib/arel/crud.rb | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index 6f4962cbfe..d310c7381f 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -3,7 +3,7 @@ module Arel # FIXME hopefully we can remove this module Crud def compile_update values, pk - um = UpdateManager.new @engine + um = UpdateManager.new if Nodes::SqlLiteral === values relation = @ctx.from @@ -26,11 +26,12 @@ module Arel end def create_insert - InsertManager.new @engine + InsertManager.new end def compile_delete - dm = DeleteManager.new @engine + dm = DeleteManager.new + dm.take @ast.limit.expr if @ast.limit dm.wheres = @ctx.wheres dm.from @ctx.froms dm |