diff options
author | Vijay Dev <vijaydev.cse@gmail.com> | 2011-09-03 01:40:00 +0530 |
---|---|---|
committer | Vijay Dev <vijaydev.cse@gmail.com> | 2011-09-03 01:40:00 +0530 |
commit | f83f169b85eea4f580ae95609506fbb3cc5b8ccb (patch) | |
tree | 045bcbd8266f74dae841444ae8811393397559f6 /railties/guides/source/active_record_querying.textile | |
parent | 78497c7c27879aa735db24377f056de96a260bb9 (diff) | |
download | rails-f83f169b85eea4f580ae95609506fbb3cc5b8ccb.tar.gz rails-f83f169b85eea4f580ae95609506fbb3cc5b8ccb.tar.bz2 rails-f83f169b85eea4f580ae95609506fbb3cc5b8ccb.zip |
some of the changes for validation earlier reverted from d20281a
Diffstat (limited to 'railties/guides/source/active_record_querying.textile')
-rw-r--r-- | railties/guides/source/active_record_querying.textile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/guides/source/active_record_querying.textile b/railties/guides/source/active_record_querying.textile index 4e77a6e803..95a7bfebc3 100644 --- a/railties/guides/source/active_record_querying.textile +++ b/railties/guides/source/active_record_querying.textile @@ -132,7 +132,7 @@ SELECT * FROM clients ORDER BY clients.id DESC LIMIT 1 <tt>Model.last</tt> returns +nil+ if no matching record is found. No exception will be raised. -h5. +first!+ +h5(#first_1). +first!+ <tt>Model.first!</tt> finds the first record. For example: @@ -149,7 +149,7 @@ SELECT * FROM clients LIMIT 1 <tt>Model.first!</tt> raises +RecordNotFound+ if no matching record is found. -h5. +last!+ +h5(#last_1). +last!+ <tt>Model.last!</tt> finds the last record. For example: |