Store objects in sessions

I have a non active revord object and i have to find an instance of
that object between requests
I have tried to save it in session but as the object uses Libxml i got
the error no marshall dump exists
I cannot make an active revord object as it is an object with no
attributes just methods
My solution is that not use an instance just The Class but then the
code becomes rather complex
So how to find an instance of that object between requests

Any ideas would be appreciated

Skickat från min iPhone

On Mon, Jun 14, 2010 at 11:10 PM, Hans M.
[email protected] wrote:

I have a non active revord object and i have to find an instance of that
object between requests
I have tried to save it in session but as the object uses Libxml i got the
error no marshall dump exists
I cannot make an active revord object as it is an object with no attributes
just methods
My solution is that not use an instance just The Class but then the code
becomes rather complex
So how to find an instance of that object between requests

If it has “no attributes”, then every instance is identical, yes? So why
not instantiate a new one when you need it?

I guess I’m having a hard time understanding your use case.


Hassan S. ------------------------ [email protected]
twitter: @hassan

My fault I did not realized that
My use vase is that I refactored some code as à service object.
That object is a parser and I would like to use the initialize methods
to
simplify the use of instance variables in different methods
As i understand your suggestion it would be ok to call a new instance
in each controller action

On 15 Juni, 16:16, Hassan S. [email protected]