This project is archived and is in readonly mode.

#2571 ✓duplicate

Rails 2.3.2 and lazy sessions issue

Reported by sh | April 27th, 2009 @ 07:06 PM | in 3.x

fresh rails 2.3.2 app configured with db session store

controller code:

    @foo = nil
    if session.nil?
      @foo = "foo"
      @foo = session[:foo]

This creates an entry in the sessions table. This seems counter-intuitive and I'd expect to have a session created only when data is added to the session. Checking for sessions should not cause new sessions to be created.

And, I'd really love to have "sessions :off" per controller back :)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href=""></a>

People watching this ticket


Referenced by