= private = protected
delete_records(records, method)
Deletes the records according to the :dependent option.
# File activerecord/lib/active_record/associations/has_many_association.rb, line 118 def delete_records(records, method) if method == :destroy records.each(&:destroy!) update_counter(-records.length) unless reflection.inverse_updates_counter_cache? else scope = self.scope.where(reflection.klass.primary_key => records) update_counter(-delete_count(method, scope)) end end