aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-09 15:58:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-09 15:58:06 -0700
commit9efae8f92de2361d50dc3ee9b674b2da1e782575 (patch)
treed18669b7d3954739faeaf6792da299cde9a82ee8 /lib
parentef85edac7b2d7119680fe691bd9eab206e8a0d41 (diff)
downloadrails-9efae8f92de2361d50dc3ee9b674b2da1e782575.tar.gz
rails-9efae8f92de2361d50dc3ee9b674b2da1e782575.tar.bz2
rails-9efae8f92de2361d50dc3ee9b674b2da1e782575.zip
adding taken method to return the limit value
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/select_manager.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/arel/select_manager.rb b/lib/arel/select_manager.rb
index 678e289814..569b631c7f 100644
--- a/lib/arel/select_manager.rb
+++ b/lib/arel/select_manager.rb
@@ -8,8 +8,12 @@ module Arel
@ctx = @head.cores.last
end
+ def taken
+ @head.limit
+ end
+
def where_clauses
- warn "STOP CALLING ME" if $VERBOSE
+ warn "where_clauses is deprecated" if $VERBOSE
to_sql = Visitors::ToSql.new @engine
@ctx.wheres.map { |c| to_sql.accept c }
end