Situation: user has a possibility to create variable amount number of
objects. The number choses user himself. After creating user wants to
see all just created objects. And only them. Not the rest.
How can it be done?
I put all created object in an array but what then? Redirecting to the
“index” shows all the objects in the table and my variable @created_objects is after redirection no longer available.
You could store the ids in an array in the session. Note: Don’t store
the entire objects in the session just the id columns so you can look
them back up in after the redirect.
Medwedj P. wrote:
Hello all!
Situation: user has a possibility to create variable amount number of
objects. The number choses user himself. After creating user wants to
see all just created objects. And only them. Not the rest.
How can it be done?
I put all created object in an array but what then? Redirecting to the
“index” shows all the objects in the table and my variable @created_objects is after redirection no longer available.