diff options
author | Xavier Noria <fxn@hashref.com> | 2013-02-23 20:49:31 +0100 |
---|---|---|
committer | Xavier Noria <fxn@hashref.com> | 2013-02-23 20:49:51 +0100 |
commit | 87c029e4dff7c15ab6faae3cce5b9aa91cf480f3 (patch) | |
tree | 2a6809468d4a10712bb50b1138c5f73c5869b8d5 /activerecord/lib/active_record/relation | |
parent | 23048551fdb679e694d8245e9f8c969ed7a71f40 (diff) | |
download | rails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.tar.gz rails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.tar.bz2 rails-87c029e4dff7c15ab6faae3cce5b9aa91cf480f3.zip |
adds a missing LIMIT 1 in #take docs
Diffstat (limited to 'activerecord/lib/active_record/relation')
-rw-r--r-- | activerecord/lib/active_record/relation/finder_methods.rb | 2 |
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) |