[Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread John Merlino
instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller instance remain alive? If so, then there's no need for sessions at all. Right? On Tuesday, March 19, 2013 12:23:44 PM UTC-4, Ruby-Forum.com

Re: [Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread Colin Law
On 20 March 2013 15:41, John Merlino stoici...@aol.com wrote: instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller instance remain alive? No. In addition, once you deploy, you cannot even

Re: [Rails] Re: storing values in session variable vs instance variable

2013-03-20 Thread Jordon Bedwell
On Wed, Mar 20, 2013 at 10:48 AM, Colin Law clan...@googlemail.com wrote: On 20 March 2013 15:41, John Merlino stoici...@aol.com wrote: instance variables are alive as long as the object instance is alive. My question then would be from one http request to the next does the same controller

[Rails] Re: storing values in session variable vs instance variable

2013-03-19 Thread Robert Walker
Norm Scherer wrote in post #1102294: On 03/18/2013 10:37 AM, John Merlino wrote: Is there a good practice when to use the session variable. Sometimes I find myself using both the session variable and instance variable. For example, I have a table that allows a user to select a date. I store