cross domain cookie

My rails server runs on localhost. I want to set a cookie for the
domain ".myapp.com". How do I do this?

(i tried cookies['xyz] = {:value => 'abc' ,:domain => '.myapp.com'} .
It doesnt work. No cookie is being set when i specify domain like
that.

thanks in advance.

My rails server runs on localhost. I want to set a cookie for the
domain ".myapp.com". How do I do this?

You can only set the domain to a parent of the website serving the
request (so if the browser accesses the website as foo.bar.com then
you can set a cookie for foo.bar.com or bar.com). Apart from that I've
set cookies in exactly the way you show.

Fred