method
delete_through_records
v3.1.0 -
Show latest stable
- Class:
ActiveRecord::Associations::HasManyThroughAssociation
delete_through_records(through, records)private
No documentation available.
# File activerecord/lib/active_record/associations/has_many_through_association.rb, line 128
def delete_through_records(through, records)
if through_reflection.macro == :has_many
records.each do |record|
through.target.delete(through_record(record))
end
else
records.each do |record|
through.target = nil if through.target == through_record(record)
end
end
end