BACKTRACE

(condense)

Back to Posts List

GET

Rails Plugin: Dynamic Session Expiry

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
<br />git://github.com/DefV/session_lifetime.git<br /></code

POST

blog comments powered by Disqus

I Don't have cookies.

ELAD ENV

Variable Value
LINKEDIN
TWITTER
FACEBOOK
GITHUB
WWR
IRC
{ 'irc.freenode.net' => [ '#rubyonrails', '#railsbridge', '#ruby', '#mootools' ]}
SKYPE
eladmeidar

You're seeing this error because I think it is funny.