aboutsummaryrefslogtreecommitdiffstats
path: root/guides/source
diff options
context:
space:
mode:
authorTrevor Turk <trevorturk@gmail.com>2013-02-28 15:53:24 -0600
committerTrevor Turk <trevorturk@gmail.com>2013-02-28 15:53:24 -0600
commit5b8b9771d7c8b45eb9f0c0ca640420eb91b8f037 (patch)
treeb864a3a0862ac39636b06aeb81f9cbe499b804ef /guides/source
parent51876271e2d1aaf50f7b1d31db06132ec5827e95 (diff)
downloadrails-5b8b9771d7c8b45eb9f0c0ca640420eb91b8f037.tar.gz
rails-5b8b9771d7c8b45eb9f0c0ca640420eb91b8f037.tar.bz2
rails-5b8b9771d7c8b45eb9f0c0ca640420eb91b8f037.zip
Document that scopes require a callable object
Diffstat (limited to 'guides/source')
-rw-r--r--guides/source/upgrading_ruby_on_rails.md10
1 files changed, 9 insertions, 1 deletions
diff --git a/guides/source/upgrading_ruby_on_rails.md b/guides/source/upgrading_ruby_on_rails.md
index dc0bc5bea1..77a09cd5f0 100644
--- a/guides/source/upgrading_ruby_on_rails.md
+++ b/guides/source/upgrading_ruby_on_rails.md
@@ -47,8 +47,16 @@ Rails 4.0 no longer supports loading plugins from `vendor/plugins`. You must rep
* Rails 4.0 has removed `attr_accessible` and `attr_protected` feature in favor of Strong Parameters. You can use the [Protected Attributes gem](https://github.com/rails/protected_attributes) to a smoothly upgrade path.
-* Rails 4.0 has deprecated `ActiveRecord::Fixtures` in favor of `ActiveRecord::FixtureSet`.
+* Rails 4.0 requires that scopes use a callable object such as a Proc or lambda:
+
+```ruby
+ scope :active, where(active: true)
+ # becomes
+ scope :active, -> { where active: true }
+```
+
+* Rails 4.0 has deprecated `ActiveRecord::Fixtures` in favor of `ActiveRecord::FixtureSet`.
* Rails 4.0 has deprecated `ActiveRecord::TestCase` in favor of `ActiveSupport::TestCase`.
### Active Resource