method
apply_scope
v6.1.3.1 -
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 156
def apply_scope(scope, table, key, value)
if scope.table == table
scope.where!(key => value)
else
scope.where!(table.name => { key => value })
end
end