On Jun 2, 6:46 pm, Chdem Chdem <li...@ruby-forum.com> wrote:

> I only have the NoMethodError when accessing to the session key/value in
> an another function than the one where affectation was made, but in the
> same controler. Is it an envidence ?

If the problem only appears when accessing stuff put in the session by
a previous request and happens in development mode it's probably
related to code reloading. In between requests reloads your classes so
on subsequent requests your session contains objects of class that
rails has thrown out.

In general you should avoid sticking large or complicated things in
the session - for example you could store an array of ids of the
active record objects. You should also know that memory store isn't a
good choice for a production app - separate passenger or mongrel
instances won't share sessions

Fred
>
> That you for your help !
>
> Frederick Cheung wrote:
> > On Jun 2, 2:54 pm, Chdem Chdem <li...@ruby-forum.com> wrote:
> >> [code]def analysis_repository
> >> .....
> >> session[:list_xml] = create_XML_file_obj(false)#put an array of
> >> XmlFile objects in the session
>
> > Is this actually an array or an association proxy that looks like an
> > array ?
>
> > Fred
>
> --
> Posted viahttp://www.ruby-forum.com/.

-- 
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-t...@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to