Ruby on Rails Tuesday, November 30, 2010

Lille wrote in post #965224:
> Hi,
>
> My Rails app offers opportunities to try out models on a 'what-if'
> basis, where dependent associations can be modified to obtain
> alternative results for the parent. Is there a way to delete/destroy
> the member of a collection so that I can play around with the
> accordingly modified parent in memory, without actually committing the
> destruction of the collection member to the data store? Based on my
> read of the docs, there is no 'delete' counterpart to
> 'collection.build' for association members.

If it were my app, I think I'd do this differently: start a transaction
for the "what if" stuff, then either roll it back or commit it when
done.

>
> Thanks for any comment,
>
> Lille

Best,

-- 
Marnen Laibow-Koser
http://www.marnen.org
marnen@marnen.org

Sent from my iPhone

--
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@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

No comments:

Post a Comment