-
-
Notifications
You must be signed in to change notification settings - Fork 491
Home
gavinhughes edited this page Sep 12, 2010
·
7 revisions
I’m using before_destroy to test the presence of children in a class using awesome_nested_set, but all the children are destroyed before before_destroy is called. Any suggestions on a fix or a way around this?
before_destroy :error_if_subregions def error_if_subregions raise "Region contains subregions" unless children.empty? end
Gavin