diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 15:44:16 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-03 15:44:16 -0800 |
commit | ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3 (patch) | |
tree | c082b8a030b2318edf23fbfc318c219cdc9e5d9b /lib/arel | |
parent | a78fe3b50253ef3d0f00e06ee328ee45bfe23321 (diff) | |
download | rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.tar.gz rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.tar.bz2 rails-ef29263428eb2aa1fdc2b6b020f0d153fd17b5f3.zip |
making sure limit is correctly copied to update manager
Diffstat (limited to 'lib/arel')
-rw-r--r-- | lib/arel/crud.rb | 2 | ||||
-rw-r--r-- | lib/arel/update_manager.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/crud.rb b/lib/arel/crud.rb index b3199e6d38..50d6f72773 100644 --- a/lib/arel/crud.rb +++ b/lib/arel/crud.rb @@ -13,7 +13,7 @@ module Arel end um.table relation um.set values - um.take @ast.limit + um.take @ast.limit.expr if @ast.limit um.order(*@ast.orders) um.wheres = @ctx.wheres diff --git a/lib/arel/update_manager.rb b/lib/arel/update_manager.rb index 821dce7d81..d92c8b9a03 100644 --- a/lib/arel/update_manager.rb +++ b/lib/arel/update_manager.rb @@ -7,7 +7,7 @@ module Arel end def take limit - @ast.limit = limit + @ast.limit = Nodes::Limit.new(limit) if limit self end |