title: how to store hash value in cookie with rails 3
body: <p>I want to implement a remember me option for the login</p>
  
  <p>therefore I want to store both username and hashed password to a cookie, and check it when the user come back to the site.</p>
  
  <p>I tried to do</p>
  
  <pre><code>cookies[:user] = { :value =&gt; {:username =&gt; @user.username, :password =&gt;
  @user.hashed_password}, :expires =&gt; 1.month.from_now }
  </code></pre>
  
  <p>it's save the cookie, but I can't read its attributes</p>
  
  <pre><code>cookies[:user].username # doesn't work
  </code></pre>
  
  <p>by the way, is it the best solution to implement RememberMe?</p>