Skip to content

Instantly share code, notes, and snippets.

@zhhz
Created February 11, 2009 16:44
Embed
What would you like to do?
# from dm-constraints/lib/dm-constraints/delete_constraint.rb
when :destroy!
if children
# not sure why but this lazy_load is necessary
# otherwise children will not be deleted with destroy!
children.lazy_load
children.destroy!
end
....
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment