Easily build a great vocabulary without studying! Now on the App Store!
Click here for more info about the app
In the parent class place the following code
has_many :posts, :dependent => :destroy
This used to be accomplished with
has_many :posts, :dependent=>true
Check out the Rails docs for more information http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html