I'm having a problem switching from cookie sessions (the default) to active record sessions.
I've created the sessions table via the rake task, uncommented the line
config.action_controller.session_store = :active_record_store
in my environment.rb file, cleared out my browsers cookies, restarted the server (natch), but still the it's using cookie_store instead of active_record store. Just to be sure, I added puts statements in the initializer block of each separate store's ruby classes in vendor rails, and only "cookie_store initialized" come out.
What am I missing here? I've tried commenting out the secret key lines:
#config.action_controller.session = { # :session_key => '_sm_session', # :secret => 'thisisJohnsSecretCodeItNeedsLotsofCharacters' #}
but I immediately get server failures because the cookie store needs them and is still active. I also tried replacing the config.action_controller.session_store = :active_record_store line with :
ActionController::Base.session_store = :active_record_store ActionController::Base.session_options[:expire_after]=2.years
after the initializer block in environment.rb, but it apparently had no effect, still the cookie_store turns on.
So, any suggestions or guidance appreciated.
ps. The reason I'm trying to switch is that I'm trying to get Facebook Connect to work via Facebooker, and apparently it requires the activerecord session store to be used.
Thanks in advanced,
John