Rails :dependent => :destroy VS :dependent => :delete_all

Posted by Sergey on Stack Overflow See other posts from Stack Overflow or by Sergey
Published on 2010-05-09T10:27:23Z Indexed on 2010/05/09 10:38 UTC
Read the original article Hit count: 287

Filed under:
|
|
|

In rails guides it's described like this: "Objects will be in addition destroyed if they’re associated with :dependent => :destroy, and deleted if they’re associated with :dependent => :delete_all."

Right, cool. But what's the difference between being destroyed and being deleted? I tried both and it seems to do the same thing.

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby