Method: ActiveRecord::Scoping::Named::ClassMethods#default_scoped
- Defined in:
- activerecord/lib/active_record/scoping/named.rb
#default_scoped(scope = relation, all_queries: nil) ⇒ Object
Returns a scope for the model with default scopes.
45 46 47 |
# File 'activerecord/lib/active_record/scoping/named.rb', line 45 def default_scoped(scope = relation, all_queries: nil) build_default_scope(scope, all_queries: all_queries) || scope end |