# Turn of dependencies so that a destroy will not destroy chil

**URL:** <https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330>\
**Category:** Rails\
**Created:** [August 29, 2007, 10:49pm UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330 "2007-08-29T22:49:29Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![newrubyguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c5a1d2/32.png) [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Post date:** [August 29, 2007, 10:49pm UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330/1 "2007-08-29T22:49:29Z")

</div>

Hello,  
Can i turn of dependencies so that a destroy on one table will not  
automatically destroy data in the child table?  
Thanks

---

<div class="post-metadata">

**Author:** ![newrubyguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c5a1d2/32.png) [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Post date:** [August 29, 2007, 11:26pm UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330/2 "2007-08-29T23:26:32Z")

</div>

Are you talking about has\_many, belongs\_to helpers or table  
inheritance?

---

<div class="post-metadata">

**Author:** ![newrubyguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c5a1d2/32.png) [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Post date:** [August 29, 2007, 11:44pm UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330/3 "2007-08-29T23:44:15Z")

</div>

Tom wrote:

> Are you talking about has\_many, belongs\_to helpers or table  
> inheritance?

Hello,  
Ya I donâ€™t think I explained that to well. I have a model test that has  
a belongs\_to :test2. When I delete from test it also deletes from test2.  
What I forgot to say is that I am using acts as paranoid so what my real  
problem is that when I delete from test is sets the deleted\_at which is  
fine. But it also sets the deleted\_at in test2 which is data that I  
still want to be able to see even though the parent has been removed.  
Basically if it is deleted from test I still want to be able to see it  
in test2. I hope that makes more sense.

Thanks again.

---

<div class="post-metadata">

**Author:** ![newrubyguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c5a1d2/32.png) [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Post date:** [August 30, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330/4 "2007-08-30T16:21:58Z")

</div>

Adam C. wrote:

> On 8/29/07, New R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:
> 
> > Tom wrote:
> 
> set :dependent =\> false (or nil) on the association
> 
> Adam

Great… Thanks

---

<div class="post-metadata">

**Author:** ![newrubyguy](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/n/c5a1d2/32.png) [@newrubyguy](https://www.ruby-forum.com/u/newrubyguy)\
**Post date:** [August 30, 2007, 12:09am UTC](https://www.ruby-forum.com/t/turn-of-dependencies-so-that-a-destroy-will-not-destroy-chil/113330/5 "2007-08-30T00:09:39Z")

</div>

On 8/29/07, New R. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Tom wrote:

set :dependent =\> false (or nil) on the association

Adam
