diff options
author | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-22 11:55:30 -0500 |
---|---|---|
committer | Francesco Rodriguez <lrodriguezsanc@gmail.com> | 2012-05-22 11:55:30 -0500 |
commit | 3e847afbdd88d53bbf85eb2436ead2dab88f6e5b (patch) | |
tree | 82d7826e80a5b6ff0e0052e1fbee11b03d14c899 | |
parent | 7e5beca38fe64344eb8b97c9fba93096ff533543 (diff) | |
download | rails-3e847afbdd88d53bbf85eb2436ead2dab88f6e5b.tar.gz rails-3e847afbdd88d53bbf85eb2436ead2dab88f6e5b.tar.bz2 rails-3e847afbdd88d53bbf85eb2436ead2dab88f6e5b.zip |
add :call-seq: to +first+ and +last+ CollectionProxy methods
-rw-r--r-- | activerecord/lib/active_record/associations/collection_proxy.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/associations/collection_proxy.rb b/activerecord/lib/active_record/associations/collection_proxy.rb index 6d001e8d10..776d65294e 100644 --- a/activerecord/lib/active_record/associations/collection_proxy.rb +++ b/activerecord/lib/active_record/associations/collection_proxy.rb @@ -129,6 +129,9 @@ module ActiveRecord ## # :method: first # + # :call-seq: + # first(limit = nil) + # # Returns the first record, or the first +n+ records, from the collection. # If the collection is empty, the first form returns +nil+, and the second # form returns an empty array. @@ -159,6 +162,9 @@ module ActiveRecord ## # :method: last # + # :call-seq: + # last(limit = nil) + # # Returns the last record, or the last +n+ records, from the collection. # If the collection is empty, the first form returns +nil+, and the second # form returns an empty array. |