title: Ruby on Rails session storage - how to *not* store certain fields in session store?
body: <ul>
  <li>WARNING: Complete newbie to RoR and Ruby alert! *</li>
  </ul>
  
  <p>I have a login method that looks like this: </p>
  
  <pre><code>@user = Person.find(:first, :conditions =&gt; ["email=?", params[:email]])
  if @user and @user.password==params[:user_password]
     session[:user] = @user
  else
     flash[:warn] = 'Invalid password!'
  </code></pre>
  
  <p>However, the user record can get <em>very</em> large, so I don't want to store the entire user record in my cookie session. </p>
  
  <p>How can I modify this code so that a specific field <em>does not</em> get stored in the session? There are two fields that can get <em>very</em> large (very large user profile data) and will not fit within the cookie session 4 kilobyte limit, so I want to exclude those from being stored in the session.</p>