Capture session expiration in Ruby on Rails
July 10th 2007Dave Naffis blogged about this neat plugin that handles all kinds of session manipulation stuff, including the ability to call a method when you expire a session.
This was just what the doctor ordered for me – I had some cleanup code to call on session expiration, and darned if I could figure out how to do this…
With the SessionExpiration plugin it’s a piece of cake
class SomeController < ApplicationController expire_session_in 5.minutes, :after_expiration => session_expiry def session_expiry # Do awesome cleanup operations here! end end
Daves blog: http://www.naffis.com
Install SessionExpiration like this:
script/plugin install http://svn.intridea.com/svn/public/session_expiration/