instance method
default_scoped
Ruby on Rails 6.0.6
Since v6.0.6Signature
default_scoped(scope = relation)
Returns a scope for the model with default scopes.
Parameters
-
scopeopt = relation
Source
# File activerecord/lib/active_record/scoping/named.rb, line 57
def default_scoped(scope = relation)
build_default_scope(scope) || scope
end
Defined in activerecord/lib/active_record/scoping/named.rb line 57
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::Scoping::Named::ClassMethods