Just in case someone else has this problem... here is a simpler solution:
I was using the AR find(@ids_array) method, where @ids_array is an
array of ids. This will throw a RecordNotFound if all ids could not
be found. The simple alternative is to use this form of the AR find:
find(:all, :conditions => [''id in (?)'', @ids_array]
It will not throw exceptions if some ids are missing.
Tom
On 9/26/05, Tom Davies <atomgiant-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
wrote:> Hi,
>
> I am using the prototype Effect.Puff when deleting elements from a
> list. This causes the element to not be visible, but it does not
> actually remove it from the list. As a result, the next time the list
> is serialized, it includes the deleted element ids and causes
> RecordNotFound exceptions.
>
> Is there a simple way to make it so the element id is not included in
> the next serialize call after a Prototype effect?
>
> Thanks,
> Tom
>