From 964392f57ad6408718458f229270b4082799d233 Mon Sep 17 00:00:00 2001 From: Xavier Noria Date: Tue, 20 May 2008 16:56:22 +0200 Subject: revised docs of first/last in AR base and association collection --- .../lib/active_record/associations/association_collection.rb | 4 ++-- activerecord/lib/active_record/base.rb | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'activerecord') diff --git a/activerecord/lib/active_record/associations/association_collection.rb b/activerecord/lib/active_record/associations/association_collection.rb index 2d3750e107..83b1fedb28 100644 --- a/activerecord/lib/active_record/associations/association_collection.rb +++ b/activerecord/lib/active_record/associations/association_collection.rb @@ -48,7 +48,7 @@ module ActiveRecord end end - # fetch first using SQL if possible + # Fetches the first one using SQL if possible. def first(*args) if fetch_first_or_last_using_find? args find(:first, *args) @@ -58,7 +58,7 @@ module ActiveRecord end end - # fetch last using SQL if possible + # Fetches the last one using SQL if possible. def last(*args) if fetch_first_or_last_using_find? args find(:last, *args) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index 35f18e9fa0..ea971a4c07 100755 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -532,14 +532,14 @@ module ActiveRecord #:nodoc: end end - # This is an alias for find(:first). You can pass in all the same arguments to this method as you can - # to find(:first) + # A convenience wrapper for find(:first, *args). You can pass in all the + # same arguments to this method as you can to find(:first). def first(*args) find(:first, *args) end - # This is an alias for find(:last). You can pass in all the same arguments to this method as you can - # to find(:last) + # A convenience wrapper for find(:last, *args). You can pass in all the + # same arguments to this method as you can to find(:last). def last(*args) find(:last, *args) end -- cgit v1.2.3