mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
adding more finder migration information to upgrade guide [ci skip]
This commit is contained in:
parent
af3a69a783
commit
a394f91009
1 changed files with 6 additions and 0 deletions
|
@ -184,6 +184,12 @@ this gem such as `whitelist_attributes` or `mass_assignment_sanitizer` options.
|
||||||
* `find_or_initialize_by_...` becomes `find_or_initialize_by(...)`.
|
* `find_or_initialize_by_...` becomes `find_or_initialize_by(...)`.
|
||||||
* `find_or_create_by_...` becomes `find_or_create_by(...)`.
|
* `find_or_create_by_...` becomes `find_or_create_by(...)`.
|
||||||
|
|
||||||
|
* Note that `where(...)` returns a relation, not an array like the old finders. If you require an `Array`, use `where(...).to_a`.
|
||||||
|
|
||||||
|
* These equivalent methods may not execute the same SQL as the previous implementation.
|
||||||
|
|
||||||
|
* To re-enable the old finders, you can use the [activerecord-deprecated_finders gem](https://github.com/rails/activerecord-deprecated_finders).
|
||||||
|
|
||||||
### Active Resource
|
### Active Resource
|
||||||
|
|
||||||
Rails 4.0 extracted Active Resource to its own gem. If you still need the feature you can add the [Active Resource gem](https://github.com/rails/activeresource) in your Gemfile.
|
Rails 4.0 extracted Active Resource to its own gem. If you still need the feature you can add the [Active Resource gem](https://github.com/rails/activeresource) in your Gemfile.
|
||||||
|
|
Loading…
Reference in a new issue