title: With mongo_session_store-rails3, session doesn't seem to work
body: <p>I'm having a problem with sessions in rails 3.2 when I use mongoid as SessionStore. I decided to use <a href="https://github.com/brianhempel/mongo_session_store" rel="nofollow">Brian Hempel's</a> fork of <code>mongo_session_store</code> gem, as it was updated last month.</p>
  
  <p>Before switching to this gem, I was using the default cookie-based session store, and it was working without problem. But now, even <code>flash</code> doesn't work when I redirect to another page. Session data seems to be reset on every single request.</p>
  
  <p>And as a side-question: every request creates a new session document in db! Is it right? I'm confused. =(</p>
  
  <p>I put these lines in my Gemfile:</p>
  
  <pre><code>gem 'mongoid', :git =&gt; 'git://github.com/mongoid/mongoid.git'
  gem 'bson_ext', "~&gt; 1.5"
  gem 'mongo_session_store-rails3', '~&gt; 3.0.5'
  </code></pre>
  
  <p>Then in my <code>config/initializers/session_store.rb</code>:</p>
  
  <pre><code>SomeAppName::Application.config.session_store :mongoid_store
  </code></pre>
  
  <p><strong>sessions_controller.rb:</strong></p>
  
  <pre><code>class SessionsController &lt; ApplicationController
    def new
      ...
    end
    def create
      user = User.find_by_identifier(params[:identifier])
      if user &amp;&amp; user.authenticate(params[:password])
        session[:uid] = user._id
        redirect_to root_url, :notice =&gt; "Logged in!"
      else
        flash.now.alert = "Invalid email or password"
        render :new
      end
    end
    def destroy
      ...
    end
  end
  </code></pre>
  
  <p>If any other part of my code is needed, please tell me to post it. Thanks in advance.</p>