[Rails] Session in ActiveRecordStore

Warren Seltzer
2006-05-17T18:47:53Z

The Agile book seems to say I should specify this as follows, probably in the
environments.rb:


  ActionController::CgiRequest::DEFAULT_SESSION_OPTIONS[:database_manager]
CGI::Session::ActiveRecordStore

BUT the environments.rb file would have me Un-Comment this:


  config.action_controller.session_store = :active_record_store

Anyway, I''ve tried both, and in both cases it generates new sessions
all too quickly, so
that no page sees the same session as the page before it.  The sessions appear
in the
database.  But as far as rails is concerned it only reads blank virginal
sessions over and
over.  So no flash appears either.   All it has to do is redirect to a different
page and
the session_id in the log is different, so the session is new and
"blank".

Any ideas why rails is erasing and/or not finding it''s own sessions?
How do I gain
control over session creation and destruction?  And if Rails is having trouble
reading the
sessions table from the database, shouldn''t it complain?  Can I get
Rails to log the SQL
it uses to create and possibly retrieve the rows from the sessions table?

Warren Fred

-------------- next part --------------
An HTML attachment was scrubbed...