title: Rails session not persisting after redirects
body: <p>I am using session store to save data into sessions. My initializers/session_store.rb looks like as:</p>
  
  <pre><code>::Application.config.session_store :active_record_store
  </code></pre>
  
  <p>Adding data to session code:</p>
  
  <pre><code>book = Book.find(1)
  session[:abc] = book
  </code></pre>
  
  <p>I am accessing this session data at a different page. Accessing session data:</p>
  
  <pre><code>book = session[:abc]
  </code></pre>
  
  <p>Problem is that my session data is not persisted between redirects. What could be the problem?</p>
  
  <p>I can see that my session is saving the data as expected but it lost some data from it when redirect happens and lost even more if again redirect happens. Frustrating it is.</p>