On Jueves, 8 de Julio de 2010 02:35:37 JeffS escribió:
> Sergio,
>
> Here is one way to duplicate the problem I am seeing with
> marked_records:
>
> 1. Mark a record (check the box).
> 2. Delete the marked record using the standard Active Scaffold
> 'Delete' action link.
> 3. Execute an action link of type :collection which is looking for
> marked records via a controller statement such as
> @marked =
> Report.find(active_scaffold_session_storage[:marked_records].to_a)
> 4. You should get an error such as "Couldn't find Report with ID=38"
> where 38 is the ID of the deleted record.

You will have to use find_all_by_id if you don't want rails raises exceptions 
in those cases. Record could be deleted from another session and rails cannot 
remove the id from your session.

>
> Therefore, it looks like deleting a record does not remove it from the
> marked_records set.

If you remove it in the same session, it should be deleted from marked_records 
set, but you can't hope all ids in marked_records exist because they can be 
deleted from another session.

I have fixed it now, id was added as string and was trying to remove the id as 
integer.

-- 
Sergio Cambra .:: entreCables S.L. ::.
Mariana Pineda 23, 50.018 Zaragoza
T) 902 021 404 F) 976 52 98 07 E) [email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to