New Ruby
2007-Aug-29 20:49 UTC
Turn of dependencies so that a destroy will not destroy chil
Hello, Can i turn of dependencies so that a destroy on one table will not automatically destroy data in the child table? Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Tom
2007-Aug-29 21:23 UTC
Re: Turn of dependencies so that a destroy will not destroy chil
Are you talking about has_many, belongs_to helpers or table inheritance? On Aug 29, 4:49 pm, New Ruby <rails-mailing-l...-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> Hello, > Can i turn of dependencies so that a destroy on one table will not > automatically destroy data in the child table? > Thanks > -- > Posted viahttp://www.ruby-forum.com/.--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
New Ruby
2007-Aug-29 21:44 UTC
Re: Turn of dependencies so that a destroy will not destroy
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. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Adam Cohen
2007-Aug-29 22:09 UTC
Re: Turn of dependencies so that a destroy will not destroy
On 8/29/07, New Ruby <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote:> > Tom wrote:set :dependent => false (or nil) on the association Adam --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
New Ruby
2007-Aug-30 14:21 UTC
Re: Turn of dependencies so that a destroy will not destroy
Adam Cohen wrote:> On 8/29/07, New Ruby <rails-mailing-list-ARtvInVfO7ksV2N9l4h3zg@public.gmane.org> wrote: >> >> Tom wrote: > > set :dependent => false (or nil) on the association > > AdamGreat.... Thanks -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---