aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source/upgrading_ruby_on_rails.md
diff options
context:
space:
mode:
authorGary S. Weaver <garysweaver@gmail.com>2013-08-27 08:59:22 -0400
committerGary S. Weaver <garysweaver@gmail.com>2013-08-27 08:59:22 -0400
commita394f91009afa1bc42822175be104e2d974fa7a1 (patch)
tree2b88474dce30b9d81792dd5bfabca728e7b56a72 /guides/source/upgrading_ruby_on_rails.md
parentaf3a69a783ea810d0045a6106f6c59573984f2ff (diff)
downloadrails-a394f91009afa1bc42822175be104e2d974fa7a1.tar.gz
rails-a394f91009afa1bc42822175be104e2d974fa7a1.tar.bz2
rails-a394f91009afa1bc42822175be104e2d974fa7a1.zip
adding more finder migration information to upgrade guide [ci skip]
Diffstat (limited to 'guides/source/upgrading_ruby_on_rails.md')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md6
1 files changed, 6 insertions, 0 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index 79e0c6bf09..357918a73c 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -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_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
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.