Hi,

If I have a model that has_many of another table, how can I make it so that when i call that model's destroy method that it also destroys all the children? Is there a method to do this?

Currently I do it like this:
Code:
 @shop.destroy
 Item.destroy_all 'shop_id = ' + @params[:id]
It works but I was wondering if maybe there was a better way

Thanks again,
Mitch