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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.
On Mon, Jun 14, 2010 at 11:10 PM, Hans Marmolin <hans.marmolin-6LjvI5LOC4niH4Lt12DN6A@public.gmane.org> 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 requestsIf 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 Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org twitter: @hassan -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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 Schroeder <hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> On Mon, Jun 14, 2010 at 11:10 PM, Hans Marmolin > > <hans.marmo...-6LjvI5LOC4niH4Lt12DN6A@public.gmane.org> 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 Schroeder ------------------------ hassan.schroe...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org > twitter: @hassan-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org 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.