title: Not able to store cookie in browser from controller
body: <p>I am using in server side rails and front end only html 
  and accessing ruby controller by ajax from html pages.</p>
  
  <p>and my html files are deployed on tomcat and i am doing cross domain ajax request</p>
  
  <p>my Response in browser  have complete header with all details.
  Still not setting cookie in Browser.</p>
  
  <pre><code>Access-Control-Allow-Credentials:true
  Access-Control-Allow-Methods:GET, POST, PUT, DELETE, OPTIONS 
  Access-Control-Allow-Origin:  localhost:8080  
  Access-Control-Max-Age:1728000 
  Cache-Control:max-age=0, private, must-revalidate 
  Connection:close  
  Content-Type:application/json; charset=utf-8
  ETag:"08499f242d03267cf0777a855aacf33e" 
  Server:thin 1.6.2 codename Doc Brown
  Set-Cookie:request_method=POST; path=/
  Set-Cookie:remember_token=oKk0zsjd4BpyXC_39k0rUA; path=/; expires=Wed, 26 Jul 2034 15:05:51 -0000
  Vary:Origin
  X-Content-Type-Options:nosniff
  X-Frame-Options:SAMEORIGIN
  X-Request-Id:111f78ff-0dc8-4926-b301-a7e58f655619
  X-Runtime:0.280800
  X-UA-Compatible:chrome=1
  X-XSS-Protection:1; mode=block
  </code></pre>
  
  <p>if some one is aware about this scenario please suggest me ..</p>
  
  <p>Thanks in advance    </p>