On Sun, Feb 28, 2010 at 2:09 PM, Rajinder Yadav <[email protected]> wrote:
> ok this is really basic rails question, but how do I keep an object alive > between controller action? I thought I could create an object and it would > remain alive, but I am guessing the controller object gets recreated each > time? > > Rajinder, you can store the object in a session. For example, you can do the following: Store: session[:object_to_persist] = an_object Retrieve: some_local_variable = session[:object_to_persist] For further information, I would recommend reading the relevant section from "Agile Web Development with Rails 3rd" by Dave Thomas et al. Good look, -Conrad > -- > Kind Regards, > Rajinder Yadav > > -- > 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 [email protected]. > To unsubscribe from this group, send email to > [email protected]<rubyonrails-talk%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > > -- 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 [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

