With session_lifetime you can set after how much time of inactivity your session should expire, you can execute an action when the session expires, and you can set where to redirect_to after session expiry.
Example
class ApplicationController << ActionController::Base
expires_session :time => 2.hours, :redirect_to => '/login'
protected
def on_expiry
flash[:notice] = "Your session has been expired, and you have been logged out."
end
end
Get it from
git://github.com/DefV/session_lifetime.git
0 comments:
Post a Comment