If I do session[:greeting] = "Hi!"
in one controller action, for how long will I be able to refer to session[:greeting]
in other controller actions?
Until the user closes his browser?
Until a certain amount of time passes?
Also, how can I configure this value?
Best Answer
Until the user closes her browser. That's the definition of a session.
To configure something longer, you will need to use one of:
Often there's a combination of these, where the user is given a "remember me" token as a cookie, so that they don't have to log in every time they restart the browser.