aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/active_record_querying.md
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2013-01-02 04:42:47 +0900
committerAkira Matsuda <ronnie@dio.jp>2013-01-02 04:47:29 +0900
commit44717a9d548c95c7b01e7e0dce061257b3a93646 (patch)
tree89d31644f3eb7571d299524f432bac4e469e1042 /guides/source/active_record_querying.md
parentad8275396ae6d76a6556e0f42d91e0a6dc42f4c8 (diff)
downloadrails-44717a9d548c95c7b01e7e0dce061257b3a93646.tar.gz
rails-44717a9d548c95c7b01e7e0dce061257b3a93646.tar.bz2
rails-44717a9d548c95c7b01e7e0dce061257b3a93646.zip
find_last_by is deprecated in AR 4
Diffstat (limited to 'guides/source/active_record_querying.md')
-rw-r--r--guides/source/active_record_querying.md2
1 files changed, 0 insertions, 2 deletions
diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md
index 618dd2652b..62d6294ae5 100644
--- a/guides/source/active_record_querying.md
+++ b/guides/source/active_record_querying.md
@@ -1230,8 +1230,6 @@ Dynamic Finders
For every field (also known as an attribute) you define in your table, Active Record provides a finder method. If you have a field called `first_name` on your `Client` model for example, you get `find_by_first_name` for free from Active Record. If you have a `locked` field on the `Client` model, you also get `find_by_locked` and methods.
-You can also use `find_last_by_*` methods which will find the last record matching your argument.
-
You can specify an exclamation point (`!`) on the end of the dynamic finders to get them to raise an `ActiveRecord::RecordNotFound` error if they do not return any records, like `Client.find_by_name!("Ryan")`
If you want to find both by name and locked, you can chain these finders together by simply typing "`and`" between the fields. For example, `Client.find_by_first_name_and_locked("Ryan", true)`.