default_scope in rails 3
15,420
Solution 1
default_scope is available in Rails 3.0, see the following
- Lighthouse Ticket referencing default_scope in Rails 3.0
- Github Rails 3.0 scope code
- Railscast about scope in Rails 3.0
Solution 2
Here's another pointer: the api doc for AR::Base.default_scope
Author by
Admin
Updated on June 04, 2022Comments
-
Admin almost 2 years
I know named_scope has been changed to scope in rails 3.
How do I perform default_scope in rails 3, I've had a good google but found nothing for defaults scopes.
-
Jim Mitchener over 13 yearsIs default_scope going to remain in rails3? It won't be deprecated in coming versions?
-
Patrick Klingemann over 13 yearsI use default_scope in a number of of Rails3 apps and I haven't seen a deprecation warning, so I assume it will remain.
-
Orlando almost 12 yearsin rails 3.2 this is the method api.rubyonrails.org/classes/ActiveRecord/Scoping/Default/…