Dependant Destruction and the problems with Rails books

| No Comments

Riding Rails: Associations aren't :dependent => true anymore


Some useful info. about how :dependent works in rails 1.1+ . Handy if you've got items that are dependent on one another and want to get rid of the child objects when you delete the parent.

the other part of this post is a continuation of something I touched on before. Ruby on Rails is great but it really moves too fast for print books. This is a good example.

In my copy of Ruby on Rails: Up and running, the bit on cascading relationships says that you specify :dependent => :true , however that doesn't work (as I found out when I tried it), cue 10 minutes of searching around for the answer which led to the post above.

Now this is probably the most recent book published about RoR and I only got my copy about 3 weeks ago, but I've found more than a couple of areas which don't match up with my rails deployment and I'm not even using Edge rails!

Leave a comment

Pages

Powered by Movable Type 4.32-en

About this Entry

This page contains a single entry by Rory2 published on September 28, 2006 7:18 PM.

Google Cheatsheet. was the previous entry in this blog.

Learn something new... every 30 minutes is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.