title: Reading cookie value in Rails
body: <p>I successfully set a cookie in JavaScript:</p>
  
  <pre><code>var date = new Date();
  date.setTime(date.getTime()+(1*24*60*60*1000)); //one day expiration date
  var expires = "; expires="+date.toGMTString();
  window.name = date.getTime();
  document.cookie = "window_name="+window.name+expires+"; path=/";
  </code></pre>
  
  <p>Then in rails I try to read (I've tried both of the following):</p>
  
  <pre><code>cookies[:window_name]
  request.cookies['window_name']
  </code></pre>
  
  <p>both of which have an empty value.
  How can I access the window_name cookie that I set in the Javascript?</p>