request.session_options broken?

I'm implementing simple "remember me" functionality for logging in
users with Rails 2.3.4. I'm trying to set the session expiration date
for some time in the future. After googling around a bit I found this
post which seems to address my problem:

My modifications to request.session_options are being ignored.
According to this discussion (
) using request.session_options to modify your session cookie is
currently broken. Is that correct?


I am also looking for a solution to this problem. It took me long
enough to figure out how to set the cookie domain going from Rails
2.2.2 to 2.3.4, now my cookies appear to expire daily instead of
never :frowning:

If you want all of the session info for your app to persist you can
set the expiration in config/initializers/session_store.rb

ActionController::Base.session = {
  :key => '_blog_session',
  :domain => '',
  :expire_after => 1.week # put whetever expiration you want here

My issue is that I only want to set the expiration to something longer
when the user explicitly asks me to.