aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/select_manager.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arel/select_manager.rb')
-rw-r--r--lib/arel/select_manager.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb
index 10d23378ae..cb656d5340 100644
--- a/lib/arel/select_manager.rb
+++ b/lib/arel/select_manager.rb
@@ -10,7 +10,7 @@ module Arel
end
def taken
- @ast.limit
+ @ast.limit && @ast.limit.expr
end
def constraints
@@ -131,7 +131,8 @@ module Arel
end
def take limit
- @ast.limit = limit
+ @ast.limit = Nodes::Limit.new(limit)
+ @ctx.top = Nodes::Top.new(limit)
self
end