From 6ee5d9244c418ab51d48bcda444ce50b1ad2a4e7 Mon Sep 17 00:00:00 2001 From: Sebastian Martinez Date: Fri, 25 Mar 2011 20:07:13 -0300 Subject: impact recent updates to #first! and #last! methods --- railties/guides/source/active_record_querying.textile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'railties/guides') diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 484ba796bd..2c5d9e67e3 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -76,7 +76,7 @@ Primary operation of Model.find(options) can be summarized as: h4. Retrieving a Single Object -Active Record lets you retrieve a single object using three different ways. +Active Record lets you retrieve a single object using five different ways. h5. Using a Primary Key @@ -132,7 +132,7 @@ SELECT * FROM clients ORDER BY clients.id DESC LIMIT 1 h5. +first!+ -Model.first! finds the first record matched by the supplied options. For example: +Model.first! finds the first record. For example: client = Client.first! @@ -149,7 +149,7 @@ SELECT * FROM clients LIMIT 1 h5. +last!+ -Model.last! finds the last record matched by the supplied options. For example: +Model.last! finds the last record. For example: client = Client.last! -- cgit v1.2.3