Skip to content

Instantly share code, notes, and snippets.

@coryodaniel
Created February 13, 2009 23:51
Show Gist options
  • Save coryodaniel/64172 to your computer and use it in GitHub Desktop.
Save coryodaniel/64172 to your computer and use it in GitHub Desktop.
when :destroy!
# not sure why but this lazy_load is necessary
# otherwise children will not be deleted with destroy!
children.lazy_load
children.destroy!
when :set_nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment