1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Adjusting 4.0 release notes to show more appropriate replacements for dynamic finders [ci skip]

This commit is contained in:
Brock Trappitt 2013-08-31 20:44:55 +08:00
parent 6617437ef2
commit 84441b289b

View file

@ -266,9 +266,9 @@ Please refer to the [Changelog](https://github.com/rails/rails/blob/master/activ
* `find_all_by_...` can be rewritten using `where(...)`.
* `find_last_by_...` can be rewritten using `where(...).last`.
* `scoped_by_...` can be rewritten using `where(...)`.
* `find_or_initialize_by_...` can be rewritten using `where(...).first_or_initialize`.
* `find_or_create_by_...` can be rewritten using `find_or_create_by(...)` or `where(...).first_or_create`.
* `find_or_create_by_...!` can be rewritten using `find_or_create_by!(...)` or `where(...).first_or_create!`.
* `find_or_initialize_by_...` can be rewritten using `find_or_initialize_by(...)`.
* `find_or_create_by_...` can be rewritten using `find_or_create_by(...)`.
* `find_or_create_by_...!` can be rewritten using `find_or_create_by!(...)`.
Credits
-------