I have a cron script that destroys sessions that are over 30 minutes,
essentially running from library...
class SessionCleaner
def self.remove_stale_sessions
CGI::Session::ActiveRecordStore::Session
Session.destroy_all( ['updated_at < ?', 30.minutes.ago] )
end
end
which works fine. Sessions are ActiveRecord if that matters.
I have on my layout for this one particular model/controller,
<meta http-equiv="refresh" content="300">
which refreshes the screen every 5 minutes which means as long as they
leave this screen open, their session is updated and never destroyed.
So I added to the model, in_out.rb
:session :on, :except => %w(list)
and restarted the server but still, when this page is refreshed, so is
the user's session.
Is it possible to have a page set so that if it is refreshed, the
session remains untouched?
I have a cron script that destroys sessions that are over 30 minutes,
essentially running from library...
class SessionCleaner
def self.remove_stale_sessions
CGI::Session::ActiveRecordStore::Session
Session.destroy_all( ['updated_at < ?', 30.minutes.ago] )
end
end
which works fine. Sessions are ActiveRecord if that matters.
I have on my layout for this one particular model/controller,
<meta http-equiv="refresh" content="300">
which refreshes the screen every 5 minutes which means as long as they
leave this screen open, their session is updated and never destroyed.
So I added to the model, in_out.rb
:session :on, :except => %w(list)
and restarted the server but still, when this page is refreshed, so is
the user's session.
Is it possible to have a page set so that if it is refreshed, the
session remains untouched?
> I have a cron script that destroys sessions that are over 30 minutes,
> essentially running from library...
>
> class SessionCleaner
> def self.remove_stale_sessions
> CGI::Session::ActiveRecordStore::Session
> Session.destroy_all( ['updated_at < ?', 30.minutes.ago] )
> end
> end
>
> which works fine. Sessions are ActiveRecord if that matters.
>
> I have on my layout for this one particular model/controller,
> <meta http-equiv="refresh" content="300">
>
> which refreshes the screen every 5 minutes which means as long as they
> leave this screen open, their session is updated and never destroyed.
>
> So I added to the model, in_out.rb
>
> :session :on, :except => %w(list)
>
Have you tried to use the above line in your controller?
> and restarted the server but still, when this page is refreshed, so is
> the user's session.
>
> Is it possible to have a page set so that if it is refreshed, the
> session remains untouched?
----
even with 'session :off' in my in_out.rb model, a refresh of my list
view of this model still updates the session.
Craig White wrote:
>
> > I have a cron script that destroys sessions that are over 30 minutes,
> > essentially running from library...
> >
> > class SessionCleaner
> > def self.remove_stale_sessions
> > CGI::Session::ActiveRecordStore::Session
> > Session.destroy_all( ['updated_at < ?', 30.minutes.ago] )
> > end
> > end
> >
> > which works fine. Sessions are ActiveRecord if that matters.
> >
> > I have on my layout for this one particular model/controller,
> > <meta http-equiv="refresh" content="300">
> >
> > which refreshes the screen every 5 minutes which means as long as they
> > leave this screen open, their session is updated and never destroyed.
> >
> > So I added to the model, in_out.rb
> >
> > :session :on, :except => %w(list)
> >
Have you tried to use the above line in your controller?
> > and restarted the server but still, when this page is refreshed, so is
> > the user's session.
> >
> > Is it possible to have a page set so that if it is refreshed, the
> > session remains untouched?
> ----
> even with 'session :off' in my in_out.rb model, a refresh of my list
> view of this model still updates the session.
>
Again try in your controller...