Re: [Rails] Destroy association in memory

2010-07-26 Thread Anatoliy Lysenko
Hi Everyone, Thanks for responses, I found what I need: http://rails.lighthouseapp.com/projects/8994/tickets/4521-habtm-ability-to-link-and-unlink-records-with-autosave-true Th

Re: [Rails] Destroy association in memory

2010-07-22 Thread Colin Law
On 22 July 2010 14:28, Anatoliy Lysenko wrote: > Hi Bill, > I was not clear, > > Given situation when we have parent object task, and child object resource, > task has many resources. Is that also resource belongs_to task? > When user edit task, change some fields, delete some resource associati

Re: [Rails] Destroy association in memory

2010-07-22 Thread Anatoliy Lysenko
Hi Bill, I was not clear, Given situation when we have parent object task, and child object resource, task has many resources. When user edit task, change some fields, delete some resource association, add some resource association Notice than user not create resource or task, it create only assoc

Re: [Rails] Destroy association in memory

2010-07-22 Thread Bill Walton
Hi Anatoliy, On Thu, Jul 22, 2010 at 6:42 AM, Anatoliy Lysenko wrote: > I need method to destroy object in memory and remove it from database > when parent object is saved. The notion of children that exiss prior to the parent's creation is a bit odd, but assuming that you have some way to ident

[Rails] Destroy association in memory

2010-07-22 Thread Anatoliy Lysenko
Hi, Does Rails antipode of build method? Build make object in memory, and save it to database when parent object is saved. I need method to destroy object in memory and remove it from database when parent object is saved. mark_for_destruction is not the answer, because it not destroy object, only m