aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorXavier Noria <fxn@hashref.com>2008-05-20 16:56:22 +0200
committerXavier Noria <fxn@hashref.com>2008-05-20 16:56:22 +0200
commit964392f57ad6408718458f229270b4082799d233 (patch)
tree354b645c0abef2d3415b83af5876462f1c7d2256 /activerecord
parentbabd1e57e697dca47c2ab8cd8c63486f2f1ea2f9 (diff)
downloadrails-964392f57ad6408718458f229270b4082799d233.tar.gz
rails-964392f57ad6408718458f229270b4082799d233.tar.bz2
rails-964392f57ad6408718458f229270b4082799d233.zip
revised docs of first/last in AR base and association collection
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/associations/association_collection.rb4
-rwxr-xr-xactiverecord/lib/active_record/base.rb8
2 files changed, 6 insertions, 6 deletions
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 <tt>find(:first, *args)</tt>. You can pass in all the
+ # same arguments to this method as you can to <tt>find(:first)</tt>.
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 <tt>find(:last, *args)</tt>. You can pass in all the
+ # same arguments to this method as you can to <tt>find(:last)</tt>.
def last(*args)
find(:last, *args)
end