title: Rails 3 cookies won't stay permanent
body: <p>I've recently upgraded to Rails 3.0.7 (from Rails 2) and I've suddenly found my cookies are no longer working. Before I was able to set the expiration date and all was well. I'm aware of the new cookies.permanent way of doing things but that doesn't seem to work either (and my understanding is that the old way should work anyways).</p>
  
  <p>Here's my code, it's very straight forward:</p>
  
  <pre><code>cookies[:remember_me_id] = { :value =&gt; user.id.to_s, :expires =&gt; 365.days.from_now }
  cookies[:remember_me_code] = { :value =&gt; Digest::SHA256.hexdigest(user.cookie_code), :expires =&gt; 365.days.from_now }
  </code></pre>
  
  <p>Just to be 100% clear, I've tried this as well:</p>
  
  <pre><code>cookies.permanent[:remember_me_id] = user.id.to_s
  cookies.permanent[:remember_me_code] = Digest:SHA256.hexdigest(user.cookie_code)
  </code></pre>
  
  <p>The cookies are created but the problem is they are set to expire when the browser closes. I've checked this in Firefox and IE. In Firefox when I go to view the cookie it says the expiration is when the browser closes. This is NOT what I want at all.</p>
  
  <p>Is there something simple I'm missing here? Some new Rails 3 setting that must be put in place to make cookies persist?</p>