aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2013-02-23 20:49:31 +0100
committerXavier Noria <fxn@hashref.com>2013-02-23 20:49:51 +0100
commit87c029e4dff7c15ab6faae3cce5b9aa91cf480f3 (patch)
tree2a6809468d4a10712bb50b1138c5f73c5869b8d5 /activerecord
parent23048551fdb679e694d8245e9f8c969ed7a71f40 (diff)
downloadrails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.tar.gz
rails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.tar.bz2
rails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.zip
adds a missing LIMIT 1 in #take docs
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/relation/finder_methods.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/relation/finder_methods.rb b/activerecord/lib/active_record/relation/finder_methods.rb
index 7ddaea1bb0..14520381c9 100644
--- a/activerecord/lib/active_record/relation/finder_methods.rb
+++ b/activerecord/lib/active_record/relation/finder_methods.rb
@@ -58,7 +58,7 @@ module ActiveRecord
# order. The order will depend on the database implementation.
# If an order is supplied it will be respected.
#
- # Person.take # returns an object fetched by SELECT * FROM people
+ # Person.take # returns an object fetched by SELECT * FROM people LIMIT 1
# Person.take(5) # returns 5 objects fetched by SELECT * FROM people LIMIT 5
# Person.where(["name LIKE '%?'", name]).take
def take(limit = nil)