method
scope_for_association
v5.2.3 -
Show latest stable
- Class:
ActiveRecord::Scoping::Named::ClassMethods
scope_for_association(scope = relation)public
No documentation available.
# File activerecord/lib/active_record/scoping/named.rb, line 40
def scope_for_association(scope = relation) # :nodoc:
current_scope = self.current_scope
if current_scope && current_scope.empty_scope?
scope
else
default_scoped(scope)
end
end