This is done often on financial sites like banks and brokerages.
a redirect after time expires. Basically, you set a timer to the number
window.top.location.href = ‘http://someplace.else.com’
That solves half the problem. The other half is if the client has
turned off. For that, you need to store a last-access time in the
So, before serving a page, simple do this in your controller:
session[:last_access] = Time.now
Then before serving the next page:
redirect_to(:action => ‘time_out’ and return if session[:last_access] <
I don’t know if this applies to all actions in your controller or only
of them. If all of them, consider writing a before_filter.
Being new to Ruby or RoR itself - I was hoping someone could point me
in the right direction to solve this problem.
View this message in context:
Sent from the RubyOnRails Users mailing list archive at Nabble.com.