method
apply_scope
v7.2.3 -
Show latest stable
- Class:
ActiveRecord::Associations::AssociationScope
apply_scope(scope, table, key, value)private
No documentation available.
# File activerecord/lib/active_record/associations/association_scope.rb, line 161
def apply_scope(scope, table, key, value)
if scope.table == table
scope.where!(key => value)
else
scope.where!(table.name => { key => value })
end
end