Permalink
Browse files

Document that scopes require a callable object

  • Loading branch information...
1 parent 5187627 commit 5b8b9771d7c8b45eb9f0c0ca640420eb91b8f037 @trevorturk trevorturk committed Feb 28, 2013
Showing with 9 additions and 1 deletion.
  1. +9 −1 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

0 comments on commit 5b8b977

Please sign in to comment.