Check delete constraints prior to destroying a dm resource or collection
@note
* It only considers a relationship's constraints if this is the parent model (ie a child shouldn't delete a parent) * Many to Many Relationships are skipped, as they are evaluated by their underlying 1:M relationships
@return [nil]
@api semi-public
# File lib/data_mapper/constraints/resource.rb, line 20 20: def enforce_destroy_constraints 21: relationships.each do |relationship| 22: next unless relationship.respond_to?(:enforce_destroy_constraint) 23: 24: constraint_satisfied = relationship.enforce_destroy_constraint(self) 25: 26: throw(:halt, false) unless constraint_satisfied 27: end 28: end
Disabled; run with --debug to generate this.
Generated with the Darkfish Rdoc Generator 1.1.6.