title: Losing session after a redirect
body: <p>I'm getting a weird behaviour in Rails 3.2.15 where the session is lost after a redirect. The redirect is on the same domain. I pinpointed the problem to Rails. </p>
  
  <p>We have an Asset model and routes like so: </p>
  
  <pre><code>resources :assets do
  </code></pre>
  
  <p>We call /assets/123 and in the controller there's a snippet of code like this:</p>
  
  <pre><code>session[:return_to] = request.url
  redirect_to(new_user_session_url)
  </code></pre>
  
  <p>When inspecting session in the SessionsController, :return_to is missing.</p>
  
  <p>This works on any other routes except assets. I tried changing the name of the routes and pointing it to the AssetsController and it works but it's not an option unfortunately.</p>
  
  <p>I know "assets" is special in Rails because it's used for the assets pipeline. Any input on what can be done in this case?</p>
  
  <p>Thanks </p>