diff options
author | Akira Matsuda <ronnie@dio.jp> | 2013-01-02 04:36:33 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2013-01-02 04:42:34 +0900 |
commit | ad8275396ae6d76a6556e0f42d91e0a6dc42f4c8 (patch) | |
tree | 7da3ca01ba74a645b1d4737a6005414e01b96cf2 /guides/source | |
parent | 545ee23f0a1e54b739b8b59cdc20e458b03c743f (diff) | |
download | rails-ad8275396ae6d76a6556e0f42d91e0a6dc42f4c8.tar.gz rails-ad8275396ae6d76a6556e0f42d91e0a6dc42f4c8.tar.bz2 rails-ad8275396ae6d76a6556e0f42d91e0a6dc42f4c8.zip |
find_all_by is deprecated in AR 4
Diffstat (limited to 'guides/source')
-rw-r--r-- | guides/source/active_record_callbacks.md | 3 | ||||
-rw-r--r-- | guides/source/active_record_querying.md | 2 |
2 files changed, 2 insertions, 3 deletions
diff --git a/guides/source/active_record_callbacks.md b/guides/source/active_record_callbacks.md index 0a93f61f6d..d743badfe7 100644 --- a/guides/source/active_record_callbacks.md +++ b/guides/source/active_record_callbacks.md @@ -168,7 +168,6 @@ Additionally, the `after_find` callback is triggered by the following finder met * `all` * `first` * `find` -* `find_all_by_*` * `find_by_*` * `find_by_*!` * `find_by_sql` @@ -176,7 +175,7 @@ Additionally, the `after_find` callback is triggered by the following finder met The `after_initialize` callback is triggered every time a new object of the class is initialized. -NOTE: The `find_all_by_*`, `find_by_*` and `find_by_*!` methods are dynamic finders generated automatically for every attribute. Learn more about them at the [Dynamic finders section](active_record_querying.html#dynamic-finders) +NOTE: The `find_by_*` and `find_by_*!` methods are dynamic finders generated automatically for every attribute. Learn more about them at the [Dynamic finders section](active_record_querying.html#dynamic-finders) Skipping Callbacks ------------------ diff --git a/guides/source/active_record_querying.md b/guides/source/active_record_querying.md index 24f98f68ca..618dd2652b 100644 --- a/guides/source/active_record_querying.md +++ b/guides/source/active_record_querying.md @@ -1228,7 +1228,7 @@ Client.unscoped { 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` and `find_all_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 `find_all_by_locked` methods. +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. |