I have been trying to figure out a way to get a session to expire after
an hour. I did a search and came up with the following code:
session[:user] = { :expires => 1.hour.from_now }
My app runs when I put this code in but after an hour of being idle
nothing happened. I’m not sure what I expected to happen, but what I
thought might happen is that after an hour the session would no longer
be in a valid state and as I tried to navigate to another page I would
be automatically signed out. But this didn’t happen. Is there anyone who
has experence doing this and can you give me some hints? Thanks,
-S