Destroy Children In Rails 2.3

       

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

Tagged w/ #dependent #has_many #rails 2.3ruby on rails

Apps I've Built

PhotoLocationChanger
Easily change the location on your photos and videos
Click here for more info about the app
PhotoDateChanger
Easily change the dates and times on your photos and videos
Click here for more info about the app
VocabReminder
English dictionary with notifications so you won't forget what you're studying!
Click here for more info about the app
VocabQuiz
The app that quizzes and scores you on your vocabulary!
Click here for more info about the app