> the method over-ride concept is really
> fundamental to OO.
I understand how over-ride works for methods I explicitly call. But that
isn't the case here. The use case starts with an abandoned session. I
found documentation on how to set the expiration time, how to reset it so
the session stays alive, etc. But I couldn't find any documentation or
examples on how the expiration process works (i.e., this call, then that,
etc.) or of how to hook into it. Do I need to put the over-ridden
definition in application.rb? Or will RoR somehow find it whichever
Controller it's in? Can you point me to any documentation on how this
works? Does Rails keep a list somewhere of all the methods an application
I will just put my 2cents in with Al's post.
Without over-riding 'reset_session', one can call it from any controller that
is a subclass of ApplicationController (AC). If ALL subclasses of AC requires
the manual clean up then the answer is "Yes, over-ride in AC".
In a previous technology I was accustomed to relying on a "Session Manager"
that runs in a background process and zaps all expired sessions automatically.
It seems we need to manage sessions differently in RoR. Once a session is idle for
an extended period (either abandoned or due to a long coffee break), the only
way (well in most cases) it gets more activity is through access from the
So it makes sense to me to invalidate the session when the client tries to
reconnect and force him/her to a new session, if the current session is
deem expired. For the "truly" abandoned sessions a cron job will have to do.