Permalink
Browse files

revised docs of first/last in AR base and association collection

  • Loading branch information...
1 parent babd1e5 commit 964392f57ad6408718458f229270b4082799d233 @fxn fxn committed May 20, 2008
@@ -48,7 +48,7 @@ def find(*args)
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 @@ def first(*args)
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)
@@ -532,14 +532,14 @@ def find(*args)
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

0 comments on commit 964392f

Please sign in to comment.